cvs,rcs
cvs,rcs
Second Generation
CVS (Concurrent Versions System)
SVN (Apache Subversion)
Perforce Helix Core
Third Generation
Git
Mercurial
BitKeeper
First Generation - Local
Version Control Software
The first generation VCS were intended to track changes for
individual files and checked-out files could only be edited
locally by one user at a time. They were built on the
assumption that all users would log into the same shared
Unix host with their own accounts.
rcsdiff hello.c
//Display the differences between the current
working copy of a file and the state of the
file when it was checked out (last co
version)
CVS
CVS was created by Dick Grune in 1986 with
the goal of adding a networking element to
version control.
CVS is a frontend for RCS
For the first time in VCS history, CVS allowed
multiple developers to check out and work
on the same files simultaneously. It did this
by using a centralized repository model.
CVS model
Server (Unix/Linux) Local machine (any O/S)
checkout, update, diff
Respository: central,
Local copy: used for
official copy, as well as
editing
entire history
add, remove, commit, tag
• Common commands:
– cvs checkout modules ; create private copy
– cvs update ; incorporate others’ changes into
private copy
– cvs add file ; add private file to repository
– cvs remove file ; remove file from repository
– cvs commit file ; publish changes to others
• Customizing:
– .cvsrc file contains default options, both global and command-
specific
Other useful commands
• To get information about a file,
cvs status file
• To examine a file’s log,
cvs log file
• To see who made what change,
cvs annotate file
Conflicts
• If two people modify the same part of a file, there is a
conflict
• CVS retains both sets of changes in the file, separated
by <<<< (changes1) ==== (changes2) >>>>
• Example:
main() {
<<<<<<< hello.c
puts("Hello, World!");
======= printf("Hello World");
>>>>>>> 1.2
}
Obtaining CVS
• CvsGui (WinCVS/MacCvs,gCvs):
http://www.wincvs.org
Download and install; this is a GUI
front-end and also includes CVS
CVS: http://www.cvshome.org
If you just want the command-line
version; documentation is here, too