|
Overview
CVS is the
version control system used in the DTPF project. The CVS repository is
provided by SourceForge. This page
is meant to summarize common commands and general policies on CVS usage
in the DTPF project. For an
introduction or review of CVS see the Red Bean Online CVS
Book.
Interested developers
who do not need write access to the repository can use the anonymous
checkout method described on the DTPF SourceForge CVS Repository page.
Registered project developers who need write access can use the 'setup_cvs.sh'
script below to simplify configuring remote access via ssh. Note that
when working on shell.sf.net (mainly for updating the website), remote
repository access via ssh is not available. In this case the anonymous
access method should be used.
Repository Organization
- DataTime
- The DTPF library and framework application source code.
- SystemLayer
- Source code for abstractions and encapsulations over system
dependent functionality.
- Website
- The project Website, including the project
developer documentation.
Basic CVS Usage and Policies
- Revision tags (See: Red Bean '
tag ' command reference)
- CVS tracks the version of each file seperately. To refer to
a specific 'revision' of a project or sub-project as a whole, tags are
used. Tags used to mark specific revisions are specified as:
- '
Initial_YYYY-MM-DD '
for initial imports
into the repository.
- '
Release_YYYY-MM-DD '
for significant
releases suitable for wider consumption.
- '
Update_YYYY-MM-DD '
to periodically mark
points of progess or changes for later reference.
For a specific tag, 'YYYY-MM-DD '
is replaced with the
date. If more precision is desired, '_hhmm '
would be
appended to the tag strings above to indicate the 24 hour time of the
tag (e.g., 3:45 PM is 1545, 6:15 AM is 0615).
To set a release or update tag, run a command of the following form in
a CVS working copy
project
directory:
> cvs tag
Release_YYYY-MM-DD_hhmm
In general tags should be set frequently, especially for
the Website. The tags that have been set can be seen using the SourceForge.net
CVS browser.
- Adding files or directories (See: Red Bean '
add ' command reference)
- Files are placed under version control using the add
command. This is a two step operation
that involves first running the add command on the file and
then commit:
>
cvs add file
>
cvs commit -m "Insert a log message here" file
The file won't actually appear in the repository until
commit is run.
Addition of directories is similar, the only difference is that a
commit is not required following addition:
>
cvs add directory
- Removing files or directories (See: Red Bean '
remove ' command reference)
- Removing a file involves multiple steps similar to
addition. In addition to running the remove command and
committing the changes, the file must first be removed from the working
copy:
>
rm file
>
cvs remove file
>
cvs commit -m "Insert a log message here" file
Note that the revision history of 'file ' is preserved by CVS
although 'file '
will not appear in new checkouts.
Removal of directories is slightly more involved and carries some
caveats. The Red
Bean discussion on removing directories gives some details on
removing directories.
- Moving files or directories (See: Red
Bean discussion on renaming files and directories)
- CVS doesn't
directly support moving files or directories. A
move operation can be performed by doing a remove followed by an add.
Since this involves a remove command, the caveats involved with
removing directories applies to moving directories as well. The Red
Bean discussion on renaming files and directories gives some
details on the issues involved.
- Importing multiple files or
directories (See: Red Bean '
import ' command reference)
- Files can be added individually to the repository, but
occasionally it is desirable to add a larger set of files. This can be
done in
one operation using the import command. There is only a need to import
a particular project or
subroject once, but we may have many subprojects. An import is run
using a command like:
>
cvs import -m "Insert a log message here" project vendortag releasetag
This command will add the files living in the directory 'project ' to the
repository. The quoted string following the '-m ' option will be recorded
in the repository as a log message for the commit being performed. If
no log message is specified using the '-m ' option, CVS will open the
default editor to enter a log message before preceeding with the
import. We will use 'KidCause '
as the 'vendortag ' for code we
are creating as part of the DTPF, and an appropriate string for
external projects that may be placed under version control (i.e., 'LCS ' for the MUSCLE package). 'releasetag ' should be of the form 'Initial_YYYY-MM-DD ' as discussed
above.
- Checking out a working copy (See: Red Bean 'checkout
' command reference)
- Checking out a working copy is relatively simple. The
general form is:
>
cvs checkout project
A working copy corresponding to a particular tag can be
obtained with:
>
cvs checkout -r releasetag project
- Checking in changes (See: Red Bean '
commit ' command reference)
- Checking in changes made to files in a working copy is also
relatively simple. To commit changes for all files in the current
directory and its sub-directories the general form is:
>
cvs commit -m "Log message"
Changes to specific files or subdirectories can be committed
individually:
>
cvs commit -m "Log message" file1 file2
>
cvs commit -m "Log message" subproject
The log message for a commit operation will be associated
with all of the files involved. If
no log message is specified using the '-m ' option, CVS will open the
default editor to enter a log message before preceeding with the
commit.
- Exporting a non-version
controlled copy (See: Red Bean '
export ' command reference)
- The export command is used to create a copy of a project in
the
repository without the CVS directories that are present in a copy
obtained with a checkout operation. An exported copy is not version
controlled and changes made to the files can not be directly commited.
The export operation is commonly used to create copies for
distribution. Exports can be made of the repository state by date or
tag:
>
cvs export -D date project
>
cvs export -r tag project
This will create an exported copy of 'project '
in './project '. An export can
also be
performed into a directory other than the project name:
>
cvs export -r tag -d directory project
- Viewing log messages from the
repository (See: Red Bean '
log '
command reference)
- The log command is used to view log messages for a project
in the repository, or for files within a project.
When no project or file is specified, log messages will be displayed
for all files and subprojects within the current working directory:
>
cvs log
Fortunately this can be reduced to a specified subproject or file:
>
cvs log subproject
>
cvs log file
- Checking on the status of a
working copy (See: Red Bean '
status '
command reference)
- The status command displays information comparing the
contents of a working copy to the repository.
When no project or file is specified, status information will be
displayed for all files and subprojects
within the current working directory:
>
cvs status
Similar to log and other CVS commands, this can be reduced to a
specified subproject or file:
>
cvs status subproject
>
cvs status file
CVS
Resources for the DTPF Project
CVS @ SourceForge |
:
|
Information on
accessing our CVS
repository.
|
SourgeForge CVS
browser
|
:
|
View our CVS repository on
the Web.
|
setup_cvs.sh
|
:
|
A simple
script to setup
the CVSROOOT and CVS_RSH environment variables to access our
repository. Before using CVS run:
>
source
setup_cvs.sh
|
General
CVS Documentation and Reference
|
|