[prog] CVS travails, and strategies

John Clarke johnc+linuxchix at kirriwa.net
Thu Sep 18 10:48:21 EST 2003


On Thu, Sep 18, 2003 at 01:53:42AM +1000, Jenn Vesperman wrote:
> On Wed, 2003-09-17 at 15:46, John Clarke wrote:
> 
> > "-j -D" works similarly to "-j -j", but it reverses every change made
> > since the given date, rather than between the two given revisions.
> > 
> > > * Replace the head sandbox with sticky files as of -D some_time_ago.
> > 
> > Yes.
> > 
> > > * Merge the branch to the files as of -D some_time_ago.
> > 
> > No.  -j works just the same as any other update - only on the current
> > working copy.  Michelle was working on the head, so that's all that she
> > changed. The branch wouldn't have changed at all.
> 
> Now we're going to get technical..

OK :-)

> Based on the behaviour Michelle described, I was suspecting that what
> she'd achieved was to have the -D run -before- the -j, so the -j ran on
> what had become the current working copy - IE, the one as of the -D
> date.

That's not the way I read it.  This is what Michelle said:

> anyway. So I made a new head sandbox, and used the command cvs update -j
> branchname -D some_time_ago, which merged my branch features with my

So she started with HEAD, then merged the branch from some_time_ago
(i.e. the -D switch selected where on the branch to merge from) into
her working copy.  Any changes made in the head since that date that
weren't also made in the branch would most likely be lost.

I haven't ever used '-D' with '-j' when merging a branch, but I have
merged branches which didn't include changes made in the head and seen
similar results to those that Michelle described - changes lost from
the head.

> Yes, I wrote the book, but no, I don't know the effects of all the
> combinations of parameters!

I don't think *anyone* knows exactly what CVS will do with every
possible combination of parameters :-)  Most of my knowledge comes from
it not doing what I expected and having to figure out how to get the
result I really wanted.

> If you _know_ that what you described above is what would happen..

I'm as sure as I ever can be when talking about cvs and merging and
branches :-)

> great. :) But can you explain what happend to Michelle's files?

Does what I said above make sense?


Cheers,

John
-- 
whois !JC774-AU at whois.aunic.net
GPG key id: 0xD59C360F
http://kirriwa.net/john/


More information about the Programming mailing list