Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Local/RepoAccess

Version 25 (modified by jsamuel, 10 years ago)

--

Anonymous Access

To check out the repository anonymously (read-only):

svn co https://seattle.cs.washington.edu/svn/seattle/trunk/

If you have previously checked out from our repository using an  http:// url rather than  https://, you can change using the following command (issued from the root of your local svn folder):

svn switch --relocate http://seattle.cs.washington.edu/svn https://seattle.cs.washington.edu/svn

This command will work regardless of the actual directory you have checked out (that is, whether you've checked out /seattle/trunk or anything else).

Depending on your system, you may be asked to accept the SSL certificate. Here is an example, showing our certificate's correct SHA1 fingerprint:

~/trunk$ svn switch --relocate http://seattle.cs.washington.edu/svn https://seattle.cs.washington.edu/svn
Error validating server certificate for 'https://seattle.cs.washington.edu:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: seattle.cs.washington.edu
 - Valid: from Tue, 20 Oct 2009 20:13:04 GMT until Thu, 21 Oct 2010 19:06:54 GMT
 - Issuer: 07969287, http://certificates.godaddy.com/repository, GoDaddy.com, Inc., Scottsdale, Arizona, US
 - Fingerprint: c3:b7:3e:d9:2c:f7:3d:45:7b:68:40:81:27:9a:51:45:a1:97:a6:6f
(R)eject, accept (t)emporarily or accept (p)ermanently?

After running the command, you can verify your new settings with svn info:

~/trunk$ svn info
...
URL: https://seattle.cs.washington.edu/svn/seattle/trunk
Repository Root: https://seattle.cs.washington.edu/svn
...

Browsing SVN through Trac

URL to Browse the repository through a web browser:

 https://seattle.cs.washington.edu/browser/seattle/trunk

This is available to anonymous users.

Developer Access

Test all code before checking it into SVN

To commit changes to the repository, you must have an ssh account on the svn server -- seattle.cs machine. To gain access email seattle-devel@cs. Once you have ssh access to the machine, you can use the following line to checkout (co) the trunk from anywhere:

svn co svn+ssh://seattle.cs.washington.edu/seattle/trunk/

If you want to perform the checkout as another user, say user BOB, then you can use the following line:

svn co svn+ssh://BOB@seattle.cs.washington.edu/seattle/trunk/

All text files maintained in our repository are in  Unix format. Make sure that your files are in this prior to making any commits. You can use the dos2unix tool on seattle.cs to convert DOS formatted files.

Note to sysadmins: svn+ssh relies on /usr/bin/svnserve. However, to make it so that users don't need to specify the svn repository root on the server, we have to modify arguments to svnserve. The following wrapper script lives at /usr/local/bin/svnserve:

#!/bin/bash

# This wrapper lives in /usr/local/bin so it will come before the actual binary at /usr/bin/svnserve
# in people's paths. We don't replace the real binary with a wrapper (renaming the real binary)
# because then it will get clobbered anytime svn is updated.

umask 002
/usr/bin/svnserve --root=/var/local/svn --tunnel

Quick Guide to SVN

Test all code before checking it into SVN

To take a look inside the repository without checking anything out:

svn list svn+ssh://seattle.cs.washington.edu/seattle/trunk/repy

To check out the entire seattle repository:

svn checkout svn+ssh://seattle.cs.washington.edu/seattle

To check out a portion of it, e.g. just the repy code sub-folder:

svn checkout svn+ssh://seattle.cs.washington.edu/seattle/trunk/repy

To find out some basic information about a checked out copy, such as the repository root, last changed rev/author/date do:

svn info

Once you make edits inside the repo, typical CVS usage applies. First do an update, then a commit:

svn update

svn commit

To add new or remove existing files/directories use:

svn add [filename]

svn remove [filename]

If you have conflicts, you must tell SVN explicitly that you have resolved them, otherwise SVN will fail to commit\update these files:

svn resolve [filename]

If you do an "svn status" in a folder, it recursively lists all the Modified (M), Deleted (D) and Added (A) files. It will also show up files that are in conflict (C) and those about which svn does not know (?). To see what modifications were made to individual files marked with an M, you'd do an "svn diff":

svn status

svn diff [filename]

If the seattle svn repo moves to a new machine, you can relocate your checked out existing version without performing a new checkout using the following command. Here old_repo and new_repo are paths to the old and new roots of the repository that you can find out with svn info:

svn sw --relocate old_repo new_repo

Links

 Useful SVN Commands

Attachments