|Version Management with CVS - the CVS manual|
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
RRP £19.95 ($29.95)
1.3.2 Committing your changes
When you have checked that the compiler is still compilable you decide to make a new version of ‘backend.c’. This will store your new ‘backend.c’ in the repository and make it available to anyone else who is using that same repository.
$ cvs commit backend.c
CVS starts an editor, to allow you to enter a log message. You type in "Added an optimization pass.", save the temporary file, and exit the editor.
The environment variable
which editor is started. If
$CVSEDITOR is not
set, then if the environment variable
set, it will be used. If both
$EDITOR are not set then there is a default
which will vary with your operating system, for example
vi for Unix or
notepad for Windows.
In addition, CVS checks the
variable. Opinions vary on whether this behavior is desirable and
whether future releases of CVS should check
ignore it. You will be OK either way if you make sure that
$VISUAL is either unset or set to the same thing as
When CVS starts the editor, it includes a list of
files which are modified. For the CVS client,
this list is based on comparing the modification time
of the file against the modification time that the file
had when it was last gotten or updated. Therefore, if
the modification time of a file has changed but its contents
have not, it will show up as modified. The simplest
way to handle this is simply not to worry about it--if
you proceed with the commit CVS will detect that
the contents are not modified and treat it as an
unmodified file. The next
update will clue
CVS in to the fact that the file is unmodified,
and it will reset its stored timestamp so that the file
will not show up in future editor sessions.
If you want to avoid starting an editor you can specify the log message on the command line using the ‘-m’ flag instead, like this:
$ cvs commit -m "Added an optimization pass" backend.c
|ISBN 0954161718||Version Management with CVS - the CVS manual||See the print edition|