CVS Notes

CVS Notes

.cvsrc File

Common .csvrc settings:

cvs -q
update -dP
diff -uN

Branches

Create a new Branch

Creating a branchpoint from something other than head:

 cvs rtag -r <TAG TO BRANCH FROM> <BRANCH POINT TAG> cvs_project_name

then

 cvs rtag -b -r <BRANCH POINT TAG> <BRANCH TAG> cvs_project_name

e.g.

 cvs rtag -r MYPROJECT_1_2 MYPROJECT_1_2_BP myproject
 cvs rtag -b -r MYPROJECT_1_2_BP MYPROJECT_NEW_WORK_BR myproject

or just

 cvs rtag -b -r MYPROJECT_1_2 MYPROJECT_NEW_WORK_BR myproject

Update a Branch from HEAD

To update a branch with the latest from HEAD:

 cvs update -j HEAD

Merge from a Branch to HEAD

 cvs update -dj <BRANCH TAG>

Merge from a Branch to another Branch

Merging a project branch to HEAD:

  • place an end point (EP) tag on project branch
  • update target branch (or HEAD), and optionally set a pre-merge tag
  • go to target branch (or HEAD) root
  • cvs update -dj <BRANCH POINT TAG> -j <END POINT TAG>

Assuming a branch point tag (ordinary tag) has been created:

 cvs update -dj <BRANCH POINT TAG> -j <MERGE POINT ON HEAD TAG>

Examples:

 cvs update -dj MYPROJECT_BP -j MYPROJECT_1_3
 
 cvs update -P -dj MYPROJECT_1_2 -j MYPROJECT_1_3

If no branch point tag (ordinary tag) has been created (at target root):

 cvs update -j <BRANCH TAG>

Example:

 cvs update -j MYPROJECT_BR
                                                                        

To do a run through without making changes use -n:

 cvs -n update -dj <BRANCH POINT TAG> -j <MERGE POINT ON HEAD TAG>

To prune empty directories:

                                                                        
 cvs update -P -dj <BRANCH POINT TAG> -j <MERGE POINT ON HEAD TAG>
 cvs update -P -dj MYPROJECT_BP -j MYPROJECT_EP

To ignore $id$ tag differences use the -kk option:

 cvs update -P -kk -dj MYPROJECT_BP -j MYPROJECT_EP

But this creates a sticky tag situation if you're on HEAD, so you need to then remove the sticky tag:

 cvs update -A

Remove a Branch

Note: only do this if it was just created and there has been no activity on it!

 cvs rtag -d -B <BRANCH TAG> cvs_project_name

Diffs

Diff Two Tags

 cvs diff -u -r <BRANCH POINT TAG> -r <MERGE POINT ON HEAD TAG>

or

 cvs diff -u -r MYPROJECT_1_2 -r MYPROJECT_1_3

Changes made in Branch

Requires a branch point tag to compare against (-kk: ignore CVS id tags).

List files changed (rdiff -s: summary change report):

 cvs -q rdiff -s -kk -r MYPROJECT_BP -r MYPROJECT_BR myproject
 cvs -q rdiff -s -kk -r MYPROJECT_VERSION_1 -r MYPROJECT_VERSION_2 myproject
 cvs -q rdiff -s -kk -r MYPROJECT_VERSION_1 -r MYPROJECT_VERSION_2 myproject/folder

List files and changes:

 cvs -q rdiff -u -kk -r MYPROJECT_BP -r MYPROJECT_BR myproject

Details on one file:

 cvs -q rdiff -kk -r MYPROJECT_VERSION_1 -r MYPROJECT_VERSION_2 myproject/folder/file.ext
cvs_notes.txt · Last modified: 12/20/2010 01:59 by Daniel Kirkdorffer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki