[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: overwrite a branch?

From: Jim.Hyslop
Subject: RE: overwrite a branch?
Date: Wed, 2 Jun 2004 09:25:56 -0400

Tyler wrote:
> For various reasons, i believe that promoting RELEASE up to 
> HEAD is a
> good idea (mostly related to low level cvs management and
> administration). 
> Question 1: am i right to want to do this?
>From what you have described, I think so. 

> Question 2: is there a better way to do this than 
> overwriting HEAD with
Not that I can think of.

> > 
> > The best way i can think of to do the overwrite is with rsync.
> > Basically, the methodology would be:
> > 
> > - freeze HEAD
> > - clean checkout of HEAD
> > - tag it :)
> > 
> > - clean checkout of RELEASE
> > - tag it
> > - copy all files in RELEASE sandbox over to HEAD sandbox
> >     - use rsync --delete to catch files that have been deleted on
> >       RELEASE but that have not had that change propagated to HEAD
> > 
> > Question 3: is this totally insane? Is there a better way to do the
> > actual overwrite?
> While i would still be interested in opinions about questions 
> 1 and 2, a
> friend of mine appears to have solved question 3. This:
> cvs up -jHEAD -jRELEASE -kk
> appears to have had the desired overwriting effect with no conflicts.
> I'm still trying to figure out how it works, so i'm not sure 
> i trust it,
Basically, an "update -jX -jY" command says "Take the diff from X to Y, and
apply it to the working directory." If you had HEAD checked out, then it
would work fine.

If we look at the HEAD as set A, and RELEASE as set B, then the diff is B-A.
Applying the diff to A gives you A+diff, which works out just fine:

diff = B-A
A+diff = A + B-A = B

The only thing I'd double check would be any files added or removed since
the branch point. I'm pretty sure they should work too, but it wouldn't hurt
to check.

> Question 3a: does this make sense? Or is there something subtle that
> might have gone wrong -- even so subtle as to fool cvs diff?
It would have to be pretty subtle, indeed!

Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (
Columnist, C/C++ Users Journal (

reply via email to

[Prev in Thread] Current Thread [Next in Thread]