CVS

Usage

cvs -d (repository) login
cvs -d (repository) checkout (module)
cvs update
cvs diff
cvs commit

NB: you can also shorten usage, eg: cvs up works just like cvs update.

I recommend always doing a cvs diff before any commits. This shows you exactly what you have changed and will be committing, and can avoid accidentally introduced typos.

Avoid mixing formatting changes with logic changes. Doing so makes it very difficult to figure out exactly what changed. Formatting changes typically effect large portions of the file but have no impact on the meaning of the file. Logic changes typically effect only small portions of the file but greatly effect behavior of the program you are editing. If you mix them, cvs tools wont be able to help you discover what really changed to cause some new behaviour. So avoid making formatting changes, and batch them up into one big commit which changes nothing but the format. This works well with indentation tools such as astyle.



Checking changes

cvs annotate (file) > tmp
Will create you a replica of the file, marked with the person who last changed each line, and what date they made the change. This is useful for finding out who is responsible for some part of the code.

cvs log (file)
Gives you the list of revisions, who made them and when.

cvs diff -r (revision) (file)
Shows you the differences between the current file, and what it was as of the specified revision. This is useful when trying to figure out what has been introduced into a new version if you are looking for an obscure bug.

No comments:

Post a Comment