[Vim-latex-cvs] CVS branching cheat sheet
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2002-12-28 00:21:05
|
This latest merge from the b-newpackages branch was more painful than it should have been, and its mostly due to some mistakes on my part.. Therefore, so as not to repeat my mistakes in the future, I am preparing a 'cheat-sheet' for branching/merging. These are compiled from: http://www.cvshome.org/docs/manual/cvs.html http://cvsbook.red-bean.com/cvsbook.html NOTE: Not all these steps are mandatory. They are just a good thing to do. Creating a branch: ================== $ cd /path/to/trunk (This is where you have checked out the main trunk. Note, if you want to create branches off branches (not recommended), then you'll want to cd to where you have checked out the branch). $ cvs update (If this shows some errors for non-mergeable files, then you'll need to resolve the conflicts manually). $ cvs diff (If this shows some diffs , then $ cvs commit (If this shows more errors for non-mergeable files, you'll also need to check for conflicts etc). ) $ cvs tag -b b-<branchname> (This is the branch name chosen) Checking out a branch ===================== $ cvs co -r b-<branchname> -d /path/to/branch <modulename> (Note, you can use -z9 before 'co' if you are on a slow connection) (Also, the argument to -d can be relative to the current directory). Preparing a branch for merging into trunk ========================================= $ cd /path/to/branch (This is where you have checked out a copy of the branch). $ cvs update (If this step shows conflicts, then resolve and commit). $ cvs diff (If this part shows some diffs, then $ cvs commit (Again, if this shows conflicts, resolve and commit). ) $ cvs tag b-<branchname>-<authorname>-merge-<mergenumber> (where <mergenumber> is the number of times you have merged from this branch to the trunk <authorname> is your name). The final Merging Step ====================== $ # now for the main trunk $ cd /path/to/main/trunk (This is where you have checked out a copy of the main trunk) $ cvs diff (again, if there are locally modified copies $ cvs commit ) # If this is the first time a merge is being done from this branch onto # the main trunk $ cvs update -d -j b-<branchname> ( Here b-<branchname> is the branch name, not a revision name. This is the name with which the branch was created) # If this is not the first merge from branch to main trunk $ cvs update -d -j b-<branchname>-<author>-merge-<mergenumber> -j b-<branchname> (Note: the first tag refers to a revision tag name, whereas the the second revision is the branch tag). |