Cunning CVS

TeeJay on 2003-04-03T16:45:00

Since I started at my new Job I have had to learn a great deal of CVS, as I now manage releases and a fairly complex CVS tree.

Here are some handy snippets that I have found useful :

always tag before and after a merge :

cvs rtag -r MyBranch_(pre|post)-merge_yyyymmdd_hhmm MyProject

Updating a branch from the Trunk :

cvs update -kk -j Trunk_BranchPoint_MyBranch -j Trunk_Latest > mergelog.txt 2>&1 # update with changes to main trunk since forking. (could also use tag of last update instead of branchpoint) and put the results in mergelog.txt, note also the -kk which skips keyword

find your conflicts :

grep -n -C2 '<<<<' * | less # list your conflicts in context


I hadn't thought of tagging before and after

runrig on 2003-04-03T20:11:31

We're still getting around to implementing CVS, and one issue was how to tell what changes some project made, and I was thinking of tagging a revision with the project name after committing, but how to easily get the version levels before the project? Just tag with pre-project_name, commit changes, tag with post-project_name. This makes it simple, thanks. But can all that be done in one "transaction"?