Note: This web site is only kept up to date for OSG Software 1.2 (VDT 2.0.0). If you are looking for information for the most recent release, the RPM-based OSG Software 3.0, please see the OSG documentation web site

VDT SVN

SVN Quick reference

VDT SVN Location, Via HTTPS: https://vdt.cs.wisc.edu/svn/
VDT SVN Location, AFS (UW CS department only): file:///p/vdt/workspace/svn

Browse repository: https://vdt.cs.wisc.edu/svn/

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

Setting Up Your Environment

For external (non-UW) users

export SVN_EDITOR=emacs
export SVN=https://vdt.cs.wisc.edu/svn/ (or however you would like to define your shortcuts)

At the UW

The svn binary that we recommend using is located in /s/subversion-1.6.17/bin. Run which svn to see the full path to your svn binary.

Configure your shell environment for a default SVN path and commit message editor:

export SVN=file:///p/condor/workspaces/vdt/svn
export SVN_EDITOR=vi

Key Subversion Commands

In the examples below, it is assumed that you set up a SVN environment variable as shown above.

Gaining remote access to the UW Subversion repository

The VDT web repository is at https://vdt.cs.wisc.edu/svn/. It is world-readable, so anyone can check out from our repository using the instructions below.

If you think you need remote write access to the repository, please contact the VDT team by email to vdt-support@opensciencegrid.org. Assuming we grant you access, you'll need to send us a user-name and password. To generate your password, run the following command:

htpasswd -c passwd.file USER

Then send us the contents of the passwd.file.

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 Remote Command Local Command
Trunk svn co https://vdt.cs.wisc.edu/svn/vdt/trunk svn co file:///p/vdt/workspace/svn/vdt/trunk
2.0.0 Production branch svn co https://vdt.cs.wisc.edu/svn/vdt/branches/vdt-2.0.0-prod svn co file:///p/vdt/workspace/svn/vdt/branches/vdt-2.0.0-prod
2.0.0 Test branch svn co https://vdt.cs.wisc.edu/svn/vdt/branches/vdt-2.0.0-test svn co file:///p/vdt/workspace/svn/vdt/branches/vdt-2.0.0-test
2.0.0 Development branch svn co https://vdt.cs.wisc.edu/svn/vdt/branches/vdt-2.0.0-dev svn co file:///p/vdt/workspace/svn/vdt/branches/vdt-2.0.0-dev
1.10.1 svn co https://vdt.cs.wisc.edu/svn/vdt/branches/vdt-1.10.1 svn co file:///p/vdt/workspace/svn/vdt/branches/vdt-1.10.1
Nightly test harness svn co https://vdt.cs.wisc.edu/svn/tests/trunk svn co file:///p/vdt/workspace/svn/tests/trunk
Sandbox area svn co https://vdt.cs.wisc.edu/svn/sandbox svn co file:///p/vdt/workspace/svn/sandbox

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 Local 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

Adding a New Remote User

If you want to provide access to our Subversion repository via HTTP to an external user, follow the steps below. Note: Currently we only support password access.

  1. Have them run the following command to generate a htpasswd line:
    htpasswd -mn USER

    where USER is their user ID on a CSL system.

    Have the user send you the line of output, which should look something like this:

    USER:$apr1$........
  2. Add the htpasswd output to the bottom of this file:
    /p/condor/workspaces/vdt/svn-access/.svn-auth-file
  3. Add the user to the other Subversion authorization file:
    /p/condor/workspaces/vdt/svn-access/svn-acl-file

    Edit the file, and add the user to the appropriate group, and update the comments to list their full name and purpose for adding them. Since we are getting UNIX usernames, we should be vigilant about noting who people are.

  4. Add the user to the authors.txt file:
    /p/condor/workspaces/vdt/svn-access/authors.txt
  5. Commit your changes to the git repository in that directory
    cd /p/condor/workspaces/vdt/svn-access
    git commit -av

Be careful! If you make mistakes when editing this file, you'll break access for everyone. If the file cannot be parsed correctly, no one is allowed access. This will result in problems like:

% svn ls $SVN
svn: access to 'https://vdt.cs.wisc.edu/svn' forbidden

You can see this kind of error by looking at /etc/httpd/logs/vdt-error_log:

[Mon Oct 24 09:57:45 2011] [error] [client 128.105.33.216] Failed to load the AuthzSVNAccessFile:
/p/vdt/workspace/svn-access/svn-acl-file:1: Section header expected [Mon Oct 24 09:57:45 2011] [error] [client 128.105.33.216] Access denied: - OPTIONS svn:/

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 ingwe. 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 ingwe. 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 ingwe, 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.

Internal Configuration

https access to the repository is maintained by the CSL. The https://vdt.cs.wisc.edu/svn URL it not in /p/vdt/public/html/, but only exists within /etc/httpd/conf/httpd.conf. If you look there, you'll find the following fragment (accurate as of 24-Oct-2011):

<VirtualHost 128.105.121.78:443>
    ServerName vdt.cs.wisc.edu
...
    <Location /svn>
        DAV svn
        SVNPath /p/vdt/workspace/svn
        AuthzSVNAccessFile  /p/vdt/workspace/svn-access/svn-acl-file
        AuthName "SVN Repositories"
        AuthType Basic
        AuthUserFile /p/vdt/workspace/svn-access/.svn-auth-file
        <LimitExcept GET PROPFIND OPTIONS REPORT>
                Require valid-user
        </LimitExcept>
    </Location>
Note that it documents the locations of the authorization files.