====== Concurrent Version System (CVS) ======
In this example we login to an **anonymous** CVS server and we **download the tree** of an entire project module.
cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
The program will prompt for a password and append some information to the **''~/.cvspass''** file.
This command will download the entire **lirc** directory into the current one:
cvs -z3 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc checkout -P lirc
This command will download a tagged version, named **releasebranch_6_3**:
CVSROOT=:pserver:grass-guest@intevation.de:/home/grass/grassrepository
cvs -z3 checkout -r releasebranch_6_3 grass6
This command brings the work tree in sync with repository (creating new **d**irectories and **P**runing empty ones):
cvs update -dP
==== Questions ====
- How to list the content of the remote server?
- How to do a partial download?
- How to do a sync?
====== Committing on SourceForge CVS ======
* [[http://alexandria.wiki.sourceforge.net/CVS+Client+-+Command-line+CVS+client+with+OpenSSH|Istruzioni di SourceForge]]
* [[http://cvsbook.red-bean.com/cvsbook.html#A%20Day%20With%20CVS|A Day With CVS]]
* [[http://ximbiot.com/cvs/manual/cvs-1.11.22/cvs.html|Concurrent Versions System v1.11.22]]
We need write access (granted by the project developers), we must use SSH (CVS via SSH) and we need a public ssh key to upload to the SourceForge site. The upload is managed via a web form, into the [[http://sourceforge.net/account/|Account Maintenance]] page.
**checkout**
This is an example of authenticated CVS check-out, **no password should be requested** because authentication is perfomed via ssh key:
export CVS_RSH=ssh
cvs -z3 -d:ext:username@navit.cvs.sourceforge.net:/cvsroot/navit co -P navit
cd navit
**diff**
A while after the checkout, you can execute a **diff** to verify your working copy against the repository:
cvs diff
**update**
If something changed, you can sync your working copy with the repository using the **update** command:
cvs update
...
cvs update: Updating projs/CodeBlocks/win32gui/resources
cvs update: Updating src
P src/coord.h
P src/projection.h
P src/transform.c
cvs update: Updating src/binding
...
Notice the **P** that means that //a working file was **patched** to match the repository//.
If you cange a file in the working copy, the update command will show you that it was modified and not yet committed:
vi po/it.po
cvs update
...
cvs update: Updating po
M it.po
...
Notice the **M** that means that //a file was **modified**//. The update command does not automatically commit your changes to the repository.
**commit**
Uploading your changes to the repository is done by the **commit** command. A message describing the change is supplied with the **-m** option, if option -m is not specified, an editor is started to enter the comment.
cd po/
cvs -z3 commit -m "New Italian translation"
cvs commit: Examining .
Checking in it.po;
/cvsroot/navit/navit/po/it.po,v <-- it.po
new revision: 1.17; previous revision: 1.16
done
Mailing navit-cvs-commit@lists.sourceforge.net...
Generating notification message...
Generating notification message... done.