|
FAQ (Frequently Asked Questions)
Category:
CVS Use
-
How do I use CVS to manage source code in CDS?
Submitted by: mpotter
Submitted on: September 9, 2004
CDS CVS Setup
Please see the subversion FAQ. CVS is destinend to be decommissioned.
CVS HowTo
This document provides a very brief summary of how to write scientific
papers using CVS. General information on CVS is available from the CVS home page. There is a full CVS manual,
which can be downloaded in various formats.
A CVS repository is the central server which holds all of the
data. This document assumes that you are using the repository located
at cvs.cds.caltech.edu:/repository.
Within a repository there will be many modules. Each paper has
its own module, which contains all of the files needed for the paper,
including the tex files, eps figures, etc.
When you are working with a paper stored in a CVS repository, you
normally checkout the module to get a local copy stored on your
own computer. You then edit the files, and commit your modified
files, so that they are once again stored in the repository.
If multiple people are working on the same paper, then the files
stored in the repository might have changed since your checkout. In
that case, you will need to update your local files to get the
latest version of the repository files. If several people have been
simultaneously editing the same file then there might be
conflicts between the changes, which will need to be
resolved. To see whether there are conflicts, it is common to
do a diff to show the differences between the local and
repository copies of a file.
Summary of commands
Username/Password: Before you can use a CVS repository, you
need to obtain a username and password for remote
access. This can be obtained from an administrator of the repository.
Checkout: Accessing a module for the first time:
cvs -d :pserver:username@cvs.cds.caltech.edu:/repository login
cvs -d :pserver:username@cvs.cds.caltech.edu:/repository checkout module
The following commands should all be run from within the local module
directory.
- Update: Getting the latest version of a module:
cvs update
- Diff: Viewing the difference between a local file and the
repository copy:
cvs diff filename
- Commit: Committing changes back to the repository:
cvs commit -m 'log_message'
- Add: Adding a new file to the repository:
cvs add filename
cvs commit -m 'log_message' filename
- Binary files: Adding a new binary file (eps
figures, pdf files, etc.) to the repository:
cvs add -kb filename
cvs commit -m 'log_message' filename
- Remove: Deleting a file from the repository:
rm filename
cvs remove filename
cvs commit -m 'log_message' filename
- Log: Viewing the log of updates to a file:
cvs log filename
Page maintained by: www-cds@cds.caltech.edu
[Back to Top]
|