VDT SVN

SVN Quick reference

Subversion book: http://svnbook.red-bean.com/nightly/en/index.html
Subversion for CVS users: http://svnbook.red-bean.com/nightly/en/svn.forcvs.html

Things to do in your .bashrc file:

svn is located in /s/std/bin.  Run 'which svn' to make sure you are using this copy.
export SVN_EDITOR=vi
export SVN=file:///p/vdt/workspace/svn (or however you would like to define your shortcuts)

The 6 commands you need to know:

Checking Out a Copy of the VDT Source Code

Here are some examples of Subversion checkout commands for the VDT. Use svn list to find other branch or tag names.

Branch Command
Trunk svn co file:///p/vdt/workspace/svn/vdt/trunk
1.10.1 branch svn co file:///p/vdt/workspace/svn/vdt/branches/vdt-1.10.1
Nightly test harness svn co file:///p/vdt/workspace/svn/tests/trunk

Fixing a Commit (log) Message

Oops, you just made a typo in your commit message. What do you do? First, figure out the revision number. You could look in the email that is sent, or do an svn log on a file that changed. Suppose the revision number is 6311. Put a new commit message into a file called msg.6311. Now run this command, after editing the highlighted part:

svnadmin --bypass-hooks setlog /p/vdt/workspace/svn -r 6311 msg.6311

Note that the hooks will not be run: This means that the RT ticket (if any) will not be updated, and no email will be sent about your change.

More details

Declaring a File to Be Executable

If you add a new file to subversion that is executable, then Subversion will remember it. If you want to make a file executable after it’s already in SVN:

svn propset svn:executable 1 TARGET

Adding a New SVN User

Access to our Subversion repository is controlled by an AFS group, condor:vdt. Members of that group have full read-write access to the repository. Thus, access control is done through AFS commands, specifically pts. You must be logged in as the condor user to run these commands. For more information, see our page about running AFS commands.

For example, to add a new user:

  1. Log in as condor; e.g.:
    kalog condor
  2. Add the user(s) to the condor:vdt group:
    pts adduser -user USER(S) -group condor:vdt

Web interface

Subversion web interface

Subversion to-do list

Subversion implementation details

The repository is located at /p/vdt/workspace/svn
Each of the SVN directories will have a corresponding trunk, branches, and tags directory. Subversion does not create physical directories the way that CVS does, but there is a command to explore a repository (svn list).

Directory layout:

Repository hooks

Repository backups

Backups are stored in an AFS volume at /p/vdt/workspace/svn-backups

Backups are run as the cndrutil user on tonic. This means that the condor:condor-admin group needs to be given full ACL permissions to /p/vdt/workspace/svn-backups and /p/vdt/workspace/svn/locks directories (because cndrutil is a member of condor:condor-admin, but not condor:vdt)

Backups run at 10:30 PM from the cndrutil user's crontab on tonic. This time was picked because the CSL runs their nightly backups at midnight. The svn backup takes less than 20 minutes to run, so it should complete with plenty of time prior to the CSL AFS backup. To modify the cndrutil user's crontab, log on to tonic, run ksu, then run 'crontab -u cndrutil -e'

The script is at /p/vdt/workspace/svn-backups/backup_svn_repos.pl. The script is configurable, and currently the last 7 days of backups are stored. If there are more than 7 backup directories, the script will delete the oldest ones, keeping the newest 7. An email is sent to the vdt-dev mailing list indicating success or failure.

Branching, Tagging, and Merging

See information here.