Archive for the 'CVS' Category

CVS or RCS

Thursday, September 7th, 2006

CVS actually uses RCS underneath. CVS is a lot more powerful tool and can control a complete source code tree. It is very strongly recommended that you use CVS, because you can greatly customize CVS with scripting languages like PERL, Korn and bash shells.

Advantages of CVS:

* CVS is decentralized so a user checks out files/directories from the repository and have his own separate stable source directory tree.
* CVS can “STAMP” releases of an entire project source tree.
* CVS can enable concurrent editing of files.
* CVS can be greatly customized to enable strong locking of files via shell scripts or PERL scripts. CVS supports weak locking with the command ‘cvs watches’ and also no locking permitting concurrent editing of files.

Disadvantages of CVS:

* Needs a little more administration than RCS.
* Very highly sophisticated and complex system. It is “State of the Art” technology. The cvs software is a very advanced and capable system developed over a very long period of time (it took several years!!). It took about 20 to 30 years of research to develop CVS and it is still evolving!!
* Has a large number of commands and command options, hence a steeper learning curve for beginners. The shell scripts at Shell Scripts can ease usage.

Advantages of RCS:

* RCS is very simple to setup, with less administrative work.
* RCS is used in a centralized area where everyone works.
* RCS is useful for simple systems.
* Very strong locking of files - concurrency eliminated.

Downside of RCS:

* Concurrent development by multiple developers is not possible due to file locking and being limited to a single working directory. Because of the single working directory limitation, changes to files by multiple developers can cause failure of the ‘make’ command.
* Cannot stamp releases of an entire software project.

CVS commands

Thursday, June 1st, 2006

cvs add
e.g.
cvs add [filenames] — Add new files or directories to the repository
cvs add -kb [filenames] — Add new binary files to the repository

cvs remove
e.g.
cvs remove [filenames] — Remove files or directories from the repository
cvs remove -f [filenames] — Remove files or directories and delete from the sandbox

cvs commit
e.g.
cvs commit [filenames] — Upload the changes done in file to repository
cvs commit -f [filenames] — Force upload of unchanged files

cvs update
e.g.
cvs update [filenames] — Download changes from the repository
cvs update -d [filenames] — Download changes, and download new directories

cvs tag
e.g.
cvs tag -b branchname [filenames] — create branch for the filenames
cvs rtag -r [tagname|revision] -b branchname project — Create a branch from anywhere using a tag name or revision
cvs rtag -D [date|time] branchname project — Create a branch from anywhere using a date or time

RCS commands

Thursday, June 1st, 2006

The following are the RCS commands.

ci — to check in a file
e.g. ci -i -u [filename]
The -i flag tells RCS to check if FILE,v already exists, and the -u flag tells RCS to leave a non-writeable copy of the working file where the working file used to be.

co — to checkout a file
e.g. co -l [filename]
Check out the file and lock it with -l. This gives write priveleges to you only. Of course, this won’t stop root from editing the file

co -p -r version FILE — checkout out the particular version of file
e.g. co -p -r1.6 FILE
This command will retrieve version 1.6 of a file.

ident — display all keywords
e.g. ident [filename]
To see what keywords are in a file name

rcsdiff — to find differences between versions of a file
e.g. rcsdiff -r1.3 -r1.6 [filename]
This will return the difference the between the version 1.3 and 1.6 of [filename]
rcsdiff [filename]
To see if the working file and RCS file have any differences

rcsmerge — merge two revisions of a file
e.g. rcsmerge -r1.3 -r1.6 [filename]
This will merge version1.3 and 1.6 of [filename]

rlog — display keyword with all log entries
e.g. rlog [filename]
This will display all the RCS version of [filename]

What is CVS and RCS ??

Wednesday, April 5th, 2006

CVS is a version tracking system. It maintains records of files throughout their development, allows retrieval of any stored version of a file, and supports production of multiple versions. CVS enables multiple developers to work simultaneously on a single file without loss of data. Each developer works on her own copy of a file, and all changes are later merged into a single master copy. CVS can be integrated with bug-tracking and feature-tracking systems, and it
provides features that can assist a project manager by tracking changes to a project over time.

CVS can be used in many environments for many purposes. It is used for maintaining configuration files, mail aliases, source code, FAQ files, art, music, articles, essays, and books. CVS is also used to store and automatically publish content to web sites and FTP servers.

The RCS (Revision Control System) program handles revision control of single files, so CVS uses RCS to store file data. CVS adds features to RCS, most notably the abilities to work over collections of files, and to work out of a repository that may be local or remote

The benefits of a version control system such as CVS include:

Any stored revision of a file can be retrieved to be viewed or changed.

The differences between any two revisions can be displayed.

Patches can be created automatically.

Multiple developers can work simultaneously on the same project or
file without loss of data.

The project can be branched to allow simultaneous development along
varied tracks. These branches can be merged back into the main line of
development.

Distributed development is supported across large or small networks.
(CVS offers a variety of authentication mechanisms.)