[Top][All Lists]

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

Best way to swap a branch with HEAD?

From: Doug Lee
Subject: Best way to swap a branch with HEAD?
Date: Mon, 19 Dec 2005 14:57:37 -0500
User-agent: Mutt/1.5.9i

This is accademic because I already did what I describe below, but I
wonder if there would have been a better solution.

I had this long branch, which I'll call xp15 (a Windows XP branch amid
NT branches actually), which was production-level code.  On the trunk,
I had a lot of experimental code which was supposed to go production
but never did.  Having learned since creating that arrangement the
wisdom of doing things the other way (branch the experiments, leave
the trunk a production source), I wanted to make HEAD again be the
main development--in this case, continue from the tip of the xp15
branch; and I wanted to move all the experimental stuff off onto its
own branch, which I'll call exp here.

Sequence of events as best I can manage from memory:

Trunk development up to initial branches.
Split off xp15 branch (and others).
Commit to trunk with experiments that never made it out.
Commit to xp15 (and others) and release from there.
...a lot of time passes during above two items ...
<<begin discontinuity>>
Check out a copy of the (experimental code) trunk.
cvs tag exp_base
cvs tag -b exp
cvs update -A  (to make sure of no sticky tags/branches in sandbox)
Check out the tip of the xp15 branch in a separate sandbox.
Make the trunk sandbox a current copy of the xp15 sandbox.
Send a huge commit consisting of all adds, removes, and mods to make trunk 
become equal to tip of xp15.
<<end discontinuity>>
Continue working on trunk with XP-related commits.
Continue working on exp branch with experimental stuff (maybe).

This worked pretty well but of course made the process of tracing XP
development history a little interesting, and the same for the
experimental code history if it resumes in the future.

I know no better way to handle this, but I thought I'd see if someone
else does.

Doug Lee                 address@hidden        
SSB + BART Group         address@hidden
"Characters live to be noticed. People with character notice how
they live." -- Nancy Moser

reply via email to

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