Home directories in CVS

Simon Law

9 March 2004

What is CVS

Source control system

CVS, Subversion, etc...

Versioned files

Collaborative changes

Remote access

Useful for configuration files as well

Problems

Copying files into new home directories

Changes don't propogate

Backups don't happen

Challenges

Portable configuration files

Host-specific issues

Auto-detection

CVS ubiquity

Available on student.math, student.cs, engage

Need a CVS server

Syntax

Root
export CVSROOT='/var/lib/cvs'
export CVSROOT='peri:/var/lib/cvs'

RSH
export CVS_RSH='ssh'

Create a repository
cvs --import sfllaw sfllaw start

Checkout
cvs checkout sfllaw

Editing

Editing files
vi .bashrc

Adding files
cvs add .bashrc

Submitting files
cvs checkin .bashrc

Differences
cvs diff .bashrc

Managing

Differences
cvs diff -r 1.3 .bashrc

Logs
cvs log .bashrc

Reverting
cvs update -j 1.4 -j 1.3 .bashrc

Portability

Choose portable programs

Configuration files

Turing completeness

Host-specific

Software available:
http://www.law.yi.org/cgi-bin/viewcvs.cgi/sfllaw/

Example

Used on various versions of POSIX

Debian GNU/Linux

Sun Solaris

Portable startup scripts

case `hostname` in laurent*) ... ;; esac

if ( type vim 2>/dev/null >/dev/null ); then ...; fi

Things you can do

Migrate your startup files

Setup all your configuration files

Manage your entire home directory
http://www.kitenet.net/~joey/cvshome.html

Use a better source control system

Questions

2004-03-09T12:00:18