Working with CVS branches
Working with CVS branches
About this file (top)
Chris Demetriou writes: So, a bunch of you often do CVS branch stuff. Below are the commands that I generally use to do branch stuff (creation, updating). Jason asked me to send them here.
Assuming ${b} == the branch name and ${m} == the module name covered by the branch. I assume that whole hierarchies will be worked with, rather than individual bits as some people seem to want to do. I've never had much luck with the latter.
To create a branch (top)
-
Tag the set of sources you want to branch with a command like:
cvs rtag -r HEAD ${b}-base ${m} -
Branch them with the command:
cvs rtag -b -r ${b}-base ${b} ${m}
Update the branch to reflect changes in the trunk (top)
-
Update your working source tree to be on the branch:
cvs update -P -r ${b}(in your working source tree)
-
Make a tag which represents the new base you're moving to:
cvs rtag -F -r HEAD ${b}-nbase ${m}This allows you to punt, and redo your merge again later if you decide you don't have time to do it right then, or whatever.
-
Merge changes between the old and new base of your branch:
cvs update -j ${b}-base -j ${b}-nbase(in your working source tree)
-
Merge conflicts, etc.
-
Check in your changes (to the branch).
-
Repoint the base tag at the new base revisions:
cvs rtag -F -r ${b}-nbase ${b}-base ${m} -
If no regular syncs with HEAD are expected, delete the new base tags:
cvs rtag -d ${b}-nbase ${m}
![[NetBSD Logo]](../../images/NetBSD-smaller.png)