r2 - 21 Aug 2007 - 18:29:59 - Main.ppadalaYou are here: TWiki >  Main Web > RtclHowtos > UsingSvn

Using the Subversion (SVN) server on Kabru

Subversion (SVN) is a version control system. Documentation of SVN can be found here and a comparison between SVN and other similar systems can be found here. Although some SVN commands are introduced here, you should read about the basic work cycle before using SVN. It should take you no more than 20 minutes to do so.

Access the SVN server

The SVN server is available at https://kabru.eecs.umich.edu/repos. Although it is stored locally on kabru and exported via NFS, you cannot access it (more specifically, write to it) using file:/// URL in order to maintain permission and repository consistency.

Note that HTTPS (SSL encryption) is required to access the repository. Kabru's certificate is issued by CAcert. Unfortunately, CAcert's root certificate does not exist in most systems. You can download the root certificate from their web site or accept the certificate presented by kabru.

Suggested directory layout

The SVN server supports access control (see below). However, to reduce administrative overhead, everyone who has an account on kabru can create files and directories at the root of the repository. In order to reduce cluttering, the top level directories should be unique names, group names, or project names (only if the collaborative nature exists in early stage.) Please do not pollute the top-level name space.

Import a new project to the SVN

After you started a new project, you can import project files to the SVN server so other people can contribute. For example, the following command will import the source directory osdi08 to https://kabru.eecs.umich.edu/repos/chtsai/papers/osdi08:

svn import osdi08 https://kabru.eecs.umich.edu/repos/chtsai/papers/osdi08

Subdirectories (_e.g., chtsai and papers) will be created automatically if they do not exist. Now you can remove or rename your source directory and do an initial checkout.

Initial check-out

Check-out a directory is very simple. The following command will create a subdirectory (called a working copy) in current directory and check out a copy of the paper.

svn co https://kabru.eecs.umich.edu/repos/chtsai/papers/osdi08

If you do not remove or rename the source directory, it will complain and fail!

Add/Remove/Rename files

After adding new files to your working copy, you need to add the new files to SVN by issuing svn add command like:

svn add Makefile

Similarly, you can remove (delete) or rename (move) files using svn delete or svn move commands.

Updating your local working copy

If the working copy is not up-to-date, you can download the most current version of the files that you are working on by issuing svn update command.

The status of your working copy

You can list the files that have been modified, added, deleted, locked, but not yet committed to the repository by issuing the svn status command. The difference between two revisions can be shown by svn diff.

Commit your changes

First, updating your local working copy before committing changes by svn update. Conflicts are indicated the a letter "C" in front of a filename. You need to edit the files in conflict state manually (looking for <<<<<<< and >>>>>>> in the source files) and issue svn resolved to remove the conflict state. Once all conflicts are resolved, commit your changes by:

svn commit -m "Some meaningful message"

Access control

To secure your directory, you can create a file named svnaccess in any subdirectory and add it to the SVN. The format of the file svnaccess is very simple. For example, I can restrict the access to my files by adding the following lines in https://kabru.eecs.umich.edu/repos/chtsai/svnaccess:

[/chtsai]
chtsai=rw
*=

The first line declare the scope. The second line grants read-write access to myself and the third line revoke any access from anyone. Read-only access can be granted by putting a "r" after the equality sign. To allow Prof. Shin editing my papers, I can append the following lines to the same file:

[/chtsai/papers]
kgshin=rw

I can also put those 2 lines in https://kabru.eecs.umich.edu/repos/chtsai/papers/svnaccess. The result is identical.

Accessing dynamic control project files maintained by Pradeep

The project resides at https://kabru.eecs.umich.edu/repos/ppadala. Use the username and password sent by Pradeep for svn access. This account does not have a home directory and should only be used for accessing SVN.

-- Main.chtsai - 15 Mar 2007

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions

tip TWiki Tip of the Day
Server side include
To include the contents of a web page or TWiki topic, use %INCLUDE{"page"}% . Examples: %INCLUDE ... Read on Read more

 
Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback