How do I replace the HEAD of a CVS repository with a branch?
1 Answer
Check out this page, which has a pretty easy to follow walk through of branching and merging in CVS
http://kb.wisc.edu/middleware/page.php?id=4087
It also includes an example of replacing HEAD with a specified branch
Replacing One Branch With Another
Tag the end of your branch
cvs tag merge_NEW_BRANCH
Switch back to the branch you're replacing
To head:
cvs up -A
To branch:
cvs up -r OLD_BRANCH
Do the replace:
Replace head
cvs up -jHEAD -j NEW_BRANCH
Replace branch
cvs up -jOLD_BRANCH -j NEW_BRANCH
Commit changes and tag if you need to.
-
I have a directory that doesn't exist in OLD_BRANCH but it does in NEW_BRANCH. When I run cvs up -jOLD_BRANCH -j NEW_BRANCH the directory is not created (and populated). Any idea why? Seems like this approach could miss other changes if it misses this directory. Mar 15, 2013 at 15:30
-
It seems adding -d works but also adds directories that don't exist in the NEW_BRANCH. Sigh. Mar 15, 2013 at 15:42
-
if you mean empty directories, it's normal CVS behaviour. You have to use additional option -P to not got them. So in the end: "cvs up -dP ..." Jun 24, 2013 at 12:33