How do I use Subversion?

What is Subversion?

Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code) and keep a log of who, when, and why changes occurred, etc. It is similar to CVS or RCS.

See this primer for Subversion for more information.

What if I want to use CVS instead?

Unfortunately, we don't have detailed instructions for using CVS. You may be able to make the CVS repository available via WebDAV using htpasswd and htaccess files. See the Answers article on WebDAV.

Note: Mercurial is available on Eniac as the command hg . Be sure to look at the Mercurial FAQ for details about the correct SSH path.

Creating a Subversion Repository

This is the syntax for creating your repository (replace "reponame" with the name of your repository):

svnadmin create --pre-1.4-compatible reponame

Important Note: You must use the pre-1.4-compatible flag for the repository to work properly.

Subversion repositories can be created on any SEAS filesystem, and can be accessed via NFS, SSH, or HTTPS. See the Subversion faq for details on how to create and/or use subversion repositories.

There are two options for setting up access to Subversion. It is not possible to use both methods since they use different ways of handling permissions and file locking.

Subversion over NFS or SSH

  1. Send mail to CETS asking us to create a unix group. The request should include the name of the group (it can be the same as the name of the repository, but it cannot be the same as anyone's PennKey username). The request should also include the PennKey usernames of the people who you want to be included in the group. If you will not be sharing the repository with any other people, then you do not need to request a group. Just use your PennKey username as the group name. Note: there is a 16 group limit for any given SEAS account.
  2. Make the directory for the repository and run these commands:

    chgrp groupname repodir
    chmod g+rwxs repodir

  3. Create the repo using svnadmin.
  4. You will probably want to add the group sticky bit (chmod g+s) so that all files are automatically created with the correct group settings.

You can then access the repo on any machine that mounts that directory. To access the repository from a machine that does not mount the directory use the subversion URL:

svn+ssh://eniac.seas.upenn.edu/full/path/to/repository

For example, from the unix command line:

svn co svn+ssh://username@eniac.seas.upenn.edu/path/to/repository

Subversion over https

If you will be sharing files with people who do not have SEAS accounts, please email the following information to cets@seas:

Each repository admin will manage subversion accounts/access via an Apache htpasswd file.

Https repositories will be available via:

https://webdav.seas.upenn.edu/svn/reponame

and the viewvc view:

https://webdav.seas.upenn.edu/viewvc/reponame

© Computing and Educational Technology Services | Report a Problem
cets@seas.upenn.edu | 215.898.4707