Re: In Eclipse, how to diff the current state against the last
checkout?
On Wed, 27 May 2009, John B. Matthews wrote:
In article <alpine.DEB.1.10.0905271350330.15331@urchin.earth.li>,
Tom Anderson <twic@urchin.earth.li> wrote:
We use Eclipse. I checked out a project from our CVS server some time
the week before last, and have been doing some far-ranging editing
since then. Elsewhere in the office, someone else has also been doing
some large-scale reorganisation, and has now checked that in. The
difference between my current state and the head is big enough that i
don't fancy merging the two (plus, there's a lot of leftover debris
from my editing, which was not done very hygeinically - it started out
as an experiment and became a feature). Rather, what i want to do is
capture the work i've done as a patch file, then throw away my work,
update to the head, and then think about manually bringing my work in
in small chunks, committing to CVS as i go. I honestly think this will
be less work in the long run than doing a big merge.
The problem is that i have no idea how to make the patch. You can make
a patch of anything you've diffed, but what do i diff against? It's not
the head; it needs to be the version that i originally checked out. But
that was two weeks ago, and wasn't a particular tag. If i knew the
exact time and date of the checkout, i could pick a version based on
that, but i don't. So how do i do this? Is there a 'diff against last
checkout' option? Is there some way to look up the time of the last
checkout? Any ideas?
I've done it both ways. Initially, I created patches against the last
common tag, and the project owner merged by hand. Fortunately, my
changes were well circumscribed, largely confined to stubs in the
original and a few bug fixes. Since then I've used the Team
Synchronizing Perspective in Incoming/Outgoing mode. Conflicts Mode
(double-headed red arrow) narrows the list of files to those you might
want to Open in Compare Editor. Before you throw anything away, at least
look at Conflicts Mode to see how much your trees have diverged. AFAIK,
it can't hurt to look.
Well, it didn't hurt *much*. :)
The other guy's changes include splitting two of the projects (the project
is actually about half a dozen CVS projects) in half, assigning some files
to each half (it's a sort of reusable / non-reusable split), and moving
things around within each half (eg from /foo/conf/main.xml to
/conf/foo.xml). It's not just that there are big differences in files,
it's that files are in completely different places. If i was using a more
sophisticated version control system that new about renames, i'd be
laughing, but sadly, i'm not.
tom
--
Come with me, and we'll go dreaming.