CVS

CVS Tricks
ignore .cvsrc $ cvs -f

Creating a Repository

 * creating a CVSROOT on remote machine:

cvs -d  init

example: cvs -d /home/schmid/cvs/ init

cd        cvs -d  import -m "message"   
 * importing project into cvs from local machine:

example: cd cpp cvs -d alvis:/home/schmid/cvs import -m "cpp imported into CVS" cpp js start


 * get checkout at local machine:

cvs -d (server:/path_which_has_CVSROOT> co 

example: cvs -d alvis:/home/schmid/cvs co cpp

Deleting a Revision
$ cvs log file.txt

RCS file: /home/schmid/cvs/something/file.txt,v Working file: file.txt head: 1.6 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3;    selected revisions: 3 description: -- revision 1.3                                                                <- this is the one we  date: 2004/09/05 13:36:35;  author: schmid;  state: Exp;  lines: +65 -1845      want to remove "sylte" -- revision 1.2 ...

$ cvs up -r 1.2 file.txt


 * CHECK THAT THE FILE IS OK, BECAUSE THE NEXT ONE CANNOT BE UNDONE!!! ***

$ cvs admin -o 1.3 file.txt

CVS'ing Your Dotfiles
copy all the relevant dotfiles from your homedir to a temporary directory:

mkdir dotfiles_tmp cp .muttrc dotfiles_tmp ...


 * rename all files to exclude the leading dot:

mv .muttrc muttrc ...


 * import the directory into cvs repository:

cvs -d alvis:/home/schmid/cvs -m "something" import dotfiles js start


 * remove the temporary directory:

cd .. mv dotfiles_tmp trash


 * check out the dotfiles to ~/.dotfiles:

cvs -d alvis:/home/schmid/cvs co .dotfiles dotfiles


 * symlink all the files to the homedir (the clever way):

cd .dotfiles for f in *;do rm -fr /home/schmid/.$f;ln -s /home/schmid/.dotfiles/$f /home/schmid/.$f;done