How do I replace the HEAD of a CVS repository with a branch?
To do this, select the project and choose Team > Replace With > Another Branch or Version from the context menu. Then select the branch to replace with. From this point, choose Team > Merge and then select the branch you want to merge into HEAD. Save this answer.
Making a Branch You can make a branch with the -b option to the cvs tag or cvs rtag commands. This option can be combined with any of the other tag-creation options of those commands. You can use a date, existing tag, or revision number to specify the revision to be branched from.
5 Branching and merging Later you can move changes from one branch to another branch (or the main trunk) by merging. Merging involves first running cvs update -j , to merge the changes into the working directory. You can then commit that revision, and thus effectively copy the changes onto another branch.
You can merge changes made on a branch into your working copy by giving the `-j branch ' flag to the update command. With one `-j branch ' option it merges the changes made between the point where the branch forked and newest revision on that branch (into your working copy). The `-j' stands for "join".
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With