The usage of Subversion from the command line is very similar to that of CVS. The access to the repository is like following:
$ svn co svn+ssh://firstname.lastname@example.org/afs/psi.ch/project/meg/svn/meg/trunk/megmc megmc $ svn co file:///afs/psi.ch/project/meg/svn/meg/trunk/megmc megmcTo get started you need to have read/write access to an AFS directory at PSI. Access to the repository at PSI is supported via direct access and via a Subversion gateway. Direct access to the repository is possible from anywhere in the world provided that as AFS client is running on the client system. The gateway allow to access the repository using either an AFS account or an anonymous account. The Subversion gateway is hosted as savannah.psi.ch. Currently only svn+ssh protocol is supported for access via savannah.psi.ch. In this section shown are brief usage of svn commands: checkout, update, commit, status and resolved. Please refer The Subversion Book for details.
$ svn co file:///afs/psi.ch/project/meg/svn/meg/trunk/megmc megmcYou will have a megmc directory, which is the working copy of the repository, with additional directory -- .svn which holds the extra information needed by Subversion. Checking out a repository via the gateway will look like:
$ svn co svn+ssh://email@example.com/afs/psi.ch/project/meg/svn/meg/trunk/megmc megmcwhere your-afs-username is your AFS account name. You may asked for the AFS password as much as three times. There is a workaround for this.
An anonymous Subversion checkout via the gateway will look like
$ svn co svn+ssh://firstname.lastname@example.org/afs/psi.ch/project/meg/svn/meg/trunk/megmc megmcwhere svn is the anonymous account, whose password is svn.
One is called ViewCVS. You can browse the meg repository from http://savannah.psi.ch/viewcvs/?root=meg, while its access is restricted from outside of PSI for the meantime.
The other is WebSVN, which will
be installed sooner (I hope) to the gateway.
3.3 Update Your Working Copy
To bring your working copy up to date, you can ask Subversion to
update. This will merge changes done by others into your working
$ svn update megmc
3.4 Commit Your Changes
Suppose you make changes to megmc/gem/xecal/src/xechit.F. Since
the .svn directory remembers the file's modification date and
original contents Subversion can tell that you've changed the file.
You will need to commit to publish your change to others:
$ svn commit megmc/gem/xecal/src/xechit.F
$ cd megmc/gem/xecal/src
$ svn commit xechit.F
If you have changed more than one file, you can commit directory
$ svn commit megmc/gem/xecal/src/
3.5 Revisions and Histories
An svn commit operation reflects on the repository your changes
to any number of files and directories as a single transaction. Each
time the repository accepts a commits, this creates a new state of
file-system tree, called a revision. In subversion, a revision
number applies to the whole repository, while in CVS, each file has a
Thanks to its atomic commit in Subversion, you can easily trace back
the history like file have been modified, added or removed in a commit
$ svn log -v megmc
while is CVS it is not that easy. One of the easiest way was to list up
the modified, added and removed files in the log, which is no longer
needed in Subversion.
3.6 Resolving Conflicts
Suppose you make changes to filename and you're going to
When somebody other than you are also changing the same file as you,
sometimes those two changes cannot be merged by subversion. Such a
conflict needs to be resolved by a human (i.e. you). At this
point Subversion will not allow you to commit the file filename
until the conflict is resolved. You need to do one of three things:
$ svn resolved filename
This removes three temporary files and Subversion no longer considers
the file to be in a state of conflict.
Table of Contents