C.2. Using CVS

If you need a CVS account or want help configuring CVS please read Section 4.3.2

CVS Commands: a brief reminder

commit

This CVS command will upload your changes to the CVS server. If you want to bypass the editor screen you can use

cvs commit -m "comment"

NoteReady for publication warning
 

You must still email when you are ready to have your changes appear on the live site. Your email should include the relative path to the file(s) in the LDP CVS tree that you wish to update.

add

You can add new files to your CVS repository. These may be image files or additional XML files. First check that your HOWTO is in its own directory. You may want to coordinate with the people at to ensure you can add graphics or other files to your HOWTO.

Copy the files you want to add into your local CVS repository (where all of your downloaded/working files are). Then:

cvs add filename

After you've added the files, you still need to commit them to the repository (see above).

remove

$Id: cvs.xml,v 1.26 2004/01/30 15:45:18 tille Exp $

While this is not a CVS "command" it can be used to automatically insert information about the file including the time and date it was last modified, the version number it was assigned by the CVS and the filename of this particular file. The output will look like this: $Id: cvs.xml,v 1.9 2002/04/21 09:44:26 serek Exp $

If you need to change a file name, you still need to use the add command. First remove the copy of the file from your local disk. Then remove it from the CVS tree with: cvs remove filename. As with the add command, you need to >commit your removed file. Finally, now that the old file has been removed, add your new file using the instructions above (first add and then commit the additional file).

C.2.1. Recovering old versions

There you are, typing away, when you screw up. Real bad. Doesn't matter what it is, but suffice it to say that you've toasted not only the version on your local drive, but created a new version on the CVS server. What you need to do is go back in time and resurrect an older version of your file.

To do this, you'll need to know the version number of the file you want to retrieve. cvs diff will give a list of revisions if there are differences. You can pick the revision number, subtract one, and that is probably the revision you want to look at.

The command

cvs -Q update -p -r revision filename

will output to stdout the contents of the revision version of filename. You can pipe it to more or redirect the output to a file. Conveniently, you can redirect stdout to a file called filename. Your local file is now the revision you want, and

cvs update

will update the CVS server with the new (old) version of filename.

C.2.2. CVS Resources

If you're completely new to CVS, there are a few web pages you may want to look at which can help you out: