How do I use Subversion?

Subversion is an open-source, centralized version control system, which allows you to archive files (usually source code) and track the changes made to them. Similar to CVS or RCS, it was created in 2000 to fix bugs and supply features missing in CVS. It enjoyed brief popularity until more flexible distributed version control systems (DVCS) such as git and Mercurial (hg) became available.

See the Version Control with Subversion book for more information.

How do I create a subversion repository?

Important: You must create the repository within $HOME/svn_root/ and use the --pre-1.4-compatible option for the repository to work properly with the SEAS subversion server.

Run this command in a terminal to create a subversion repository (replace "reponame" with the name of your repository):

svnadmin create --pre-1.4-compatible reponame

You can then directly access the repository on any machine that mounts that filesystem.

How do I access my subversion repository using SSH?

Penn VPN software is required for all SSH connections from networks that are outside of PennNet.

Before connecting to a machine on PennNet via SSH from an external network, you must install and run the University Client VPN software:

You can access repositories created on eniac.seas.upenn.edu via SSH by using the subversion URL in this format:

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

In this example, the user hughzer is checking out the ahoylibs repository in ~hughzer/svn_root/:

svn co svn+ssh://hughzer@eniac.seas.upenn.edu/home1/h/hughzer/svn_root/ahoylibs

How do I access my subversion repository using HTTPS?

If you would like to use the SEAS subversion server to access your repository via HTTPS, please contact CETS and provide the following information:

If you require restricted access for your repository via HTTPS, you will need to use the htpasswd command to manage usernames and passwords.

  1. Log into eniac.seas.upenn.edu and cd into the repository's conf/ directory where you will create your .htpasswd file.

  2. Run this command to create a new .htpasswd file with an initial user (replace username with the desired username):

    htpasswd -c .htpasswd username
  3. Enter a password for the user at the prompt.

  4. Run this command to add another user to an existing .htpasswd file (replace username2 with the desired username):

    htpasswd .htpasswd username2
  5. Make sure your .htpasswd file is world readable (more info on changing permissions).

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/

Run this command to check out a repository:

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

The viewvc view is available to web browsers via:

https://webdav.seas.upenn.edu/viewvc/reponame/
© Computing and Educational Technology Services