cvs

Tracking Changes

From within /home/dirk/theirproj-1.0: cvs import -m "Import of TheirProj 1.0" theirproj THEIRPROJ_1_0

then: cvs co theirproj

Now I have to import Version 2.0 of TheirProj, run this from within /home/dirk/theirproj-2.0: cvs import -m "Import of TheirProj 2.0" theirproj Them THEIRPROJ_2_0

then do cvs co -j THEIRPROJ_1_0 -j THEIRPROJ_2_0 theirproj and resolve the conflicts.

Commit the changes with cvs ci -m "some message".

Updating to a tagged version

cvs up -r tag tag-name

Remove a tag

cvs up -A filename

Tagging a version

cvs tag tagname

Checking out of a tagged version

cvs co -r tag tagname

Merging changes from branch to trunk

cvs up -A
cvs diff -r branchname
cvs up -j branchname
cvs ci -m "merged changes from branchname"
cvs tag -m branchname_merge_number

First I move my changes off the branch, then review the changes with cvs diff, and then do the actual merge.

Always tag the branch after a merge! That makes multiple merges much easier.

Branching

cvs tag tag_before_branchname
cvs tag -b branchname
cvs tag tag_after_branchname
cvs update -r branchname

You should always tag before and after branching.

If you have uncommitted changes in your current copy, you may want to checkout the branch instead:
cvs co -d target_directory -r branchname

Create a repository

cvs -d /fullpath init

Create a unix group cvs and add all the users who need access to the repository, then change the repository's group ownership and permissions.

Revert to an older version

cvs up -j new_version -j old_version filename
cvs ci -m "reverted to old_version" filename
Syndicate content