O'Reilly logo

Linux Server Hacks by Rob Flickenger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #30. CVS: Making Changes to a Module

Checking in your changes in CVS

Once your files are checked out, edit them and compile them normally. Apply the updates to the repository with cvs commit. This command needs to be run higher in the hierarchy than all the files you have changed — you can always run it from the base of your working copy.

You can also cvs commit filename, which will commit a single file or recursively commit a directory.

Different project teams have different opinions on how often to do a cvs commit. Good rules of thumb include "every time you have a clean compile," and "every day before lunch and before you leave."

cvs/example$ cvs commit
cvs commit: Examining .
cvs commit: Examining src 
jenn@cvs.sample.com.au's password:

CVS examines each directory and subdirectory below the current working directory. Any file that CVS knows will be checked for changes. If your cvs repository is not on the local machine, CVS will ask for a password for the remote machine, unless you have already set up your ssh host keys (as shown in [Hack #66]) and have eliminated the need for passwords.

CVS then opens whichever editor is the default in your environment — based on the $CVSEDITOR or $EDITOR environment variables. Add change-notes for the appropriate files, as in:

CVS:------------------------------------------------------------------ CVS: Enter Log. Lines beginning with 'CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: example/src/sample.h ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required