Cvs

From Federal Burro of Information
Revision as of 21:23, 11 September 2022 by David (talk | contribs) (→‎Keywords)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

Concurrent Versions System or cvs as it's typically called is used for keepping track of changes to text files, like scripts and source code.

cydonia has a cvs repository in /var/cvs

viewvc.cgi is a great cgi front end.

cvs uses the enviroment variable CVSROOT by default to detemrine where the file repository is kept. local to cydonia you wuld do this:

export CVSROOT=/var/cvs

if you would like to work with cvs over the netowrk check out the ssh section below.

cvs configuration

You can put your own cvs config in ~/.cvsrc. I find this config handy:

# always use the -N (show added or removed files) and -u (unified diff format) options to diff(1).
diff -Nu
# always use the -P (prune empty directories) and -d (check out new directories) options when updating.
update -Pd
# always use the -P (prune empty directories) option when checking out.
checkout -P

Shamelessly Borrowed from:
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/cvs.operations.html

cvs template

CVS commit templates can be created to capture additional useful information.

Reason:
Reference:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: Reason: 
CVS:    A discription of the change
CVS: Reference: 
CVS:    ticketnumber, bugzilla id etc
CVS: Reviwed by:
CVS:    peer reviewer

This was done by checking out CVSROOT and modifying rcsinfo, rcstemplate, and checkoutlist.

  • rcsinfo was modified by adding the following line. Commenting out this line will also disable the template.
       ALL $CVSROOT/CVSROOT/rcstemplate
  • rcstemplate is a text file which contains the template, which is now part of the CVSROOT repository.
  • checkoutlist

Keywords

You can drop keywords in to cvs control files and they will be dynamically update.

so for example

# $Id$

will be expanded when checking out

# $Id: mkbb.pl,v 1.15 2002/10/30 16:38:02 user Exp $

This is: the file, the version , the date , the author, the state.

More: http://ximbiot.com/cvs/manual/cvs-1.11.6/cvs_12.html

# $Author$
# $Date$
# $Header$
# $Id$
# $Name$
# $Revision$
# $State$

cvs over ssh

export CVS_RSH="/usr/local/bin/ssh"
export CVSROOT=":ext:username@cvsserver:/var/cvs"

See Also

Branching and Merging in CVS

Git