Prev | Current Page 1432 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"


cvs commit: Examining .
[editor session]
Checking in main.c;
/space/cvs/newhello/main.c,v <-- main.c
new revision: 1.2; previous revision: 1.1
done
When you check in a modified file, CVS opens an editor session to enable you to enter a log message
that describes the changes you made. The editor used is the editor defined in the $EDITOR
environment variable or compiled-in default (usually the vi text editor) if $EDITOR is undefined.
This example did not use the -d option because the $CVSROOT environment variable is set.
To check out a specific version, or revision, of a file, use the -r option following the checkout
or co command, followed by a revision number. For example, to check out revision 1.1 of the
main.c file, use the following command:
$ cvs checkout -r 1.1 main.c
U main.c
To see the differences between two revisions, use the diff command, using the -r m.n, where
m.n indicates the revision number you want to check. If you specify -r only once, the indicated
version will be compared against the working file (using the diff option). If you specify -r twice,
the two versions will be compared against each other. The following example compares revision 1.2
of showit.c to the current working revision (the revision currently in the working directory):
$ cvs diff -r 1.


Pages:
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444