Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

CVS client usage and configuration
 
Connect with pserver
Connect with the pserver method,
export CVSROOT=:pserver:YOUR_USERNAME@CVS_SRV:/cvsroot/
unset CVS_RSH
cvs login
Note. 'cvs login' only once, the password gets stored into '~/.cvspass'.
 
Connect locally on the server
Connect locally (just like with SSH but even simplier),
export CVSROOT=/cvsroot/
 
Connect with ssh (system authentication only)
Connect with the SSH method,
export CVSROOT=YOUR_USERNAME@CVS_SRV:/cvsroot/
export CVS_RSH=ssh
Note. no need to 'cvs login' with the SSH authentication method.
Note. works w/o specifying ':ext' (use of an external program to connect and authenticate like rsh and ssh), seems to be implicit when CVS_RSH is defined.
Note. if you need to define a special remote port for SSH, you'll have to tweak your ssh client's configuration. There is no place in the :ext scheme to place the port number.
cd ~/
mkdir -p .ssh/
cd .ssh/
ls -l config
cat >> config <<EOF9
Host cvs.example.net
Port ALTERNATE_PORT
EOF9
cd ../
Ref. http://www.bartbusschots.ie/blog/?p=527
 
Creating a repository
Note. Either enter into the cvs repository to proceed with the commands (init, import, update) or specify it with '-d'.
 
Create a CVS tree,
mkdir -p repocheck/
cd repocheck/
echo check ok > check
cvs import -m import repocheck organization current
Note. The -m argument is just for the log message.
Note. Synopsis: import [-options] repository vendortag releasetag
- first argument is the remote folder name for the repository.
- second argument is the vendor tag, define your organization.
- third argument is the release tag, using 'current' here for current-ony developments. Otherwise say e.g. v0.1.
 
Once imported, you may re-fetch it,
cd ../
rm -rf repocheck/
cvs co -P repocheck
cd repocheck/
ls -al
 
Usage
Note. Either enter into the cvs repository to proceed with the commands (init, import, update) or specify it with '-d'.
 
Checkout,
cvs co -P code
 
Update,
cd reponame/
cvs up -dP
 
Edit a file,
vi file
cvs commit
 
Add a file,
cvs add file
cvs commit
 
Remove a file,
rm -f file
cvs remove file
cvs commit
 
Add a folder containing at least one file,
cvs add folder
cvs add folder/files*.ksh
cvs commit
 
Remove a file,
rm file
cvs remove file
Note. you can't remove a folder. You'll eventually have to ask the CVS admin to remove it manually from the filesystem. Otherwise always use -P (omit empty directories) when checking out and updating.
 
Check that there's no sticky tags lying around,
cvs status | grep 'Sticky Tag' | grep -v none
remove sticky tags e.g. against the slackconf.ksh script,
cvs update -j slackconf.ksh
 
Advanced usage
Note. To rename a CVS repository on the server,
cd /cvsroot/
mv repo newname
 
Note. to reimport a whole tree either by changing its name or removing it on the cvs server,
find . | grep CVS$
#find . | grep CVS$ | xargs rm -rf
cvs import ...
 
Client troubbleshooting
This error while updating,
unrecognized request `xxxxxx'
or,
protocol error: Malformed Entry
might be caused by tcp offloading issues e.g. on xen guests, check,
ethtool -k eth0 2>/dev/null
 
If you get that error (we had this one on slackware, not rhel),
cvs login: warning: failed to open HOME/.cvspass for reading: No such file or directory
just fix it locally,
touch ~/.cvspass
chmod 600 ~/.cvspass
 
If you get this error,
cvs update: warning: directory CVS specified in argument
fix the concerned 'Entries' file(s) to remove the CVS directory reference,
find . -name Entries -print0 | xargs -0 grep -l CVS
vi ...
 

(obsolete, see the new doc)