Hood College

Department of Computer Science



Hood College




Document List

Adding an Icon
Adding a Menu Item
Changing Directory/File Permission Using Linux Command Line
Cleaning Your Home Directory
Creating Your Web Site
Getting Started with Subversion
HT 319 Computers
Linux for CS courses
Obtaining Your Account on CS Servers
Printing Multiple slides per Page for OpenOffice.org 2.0 Impress
Printing Your Graphic Output
Setting up Cygwin and SSH on Windows XP
Sharing Files between Windows and Linux
Using USB Memory Stick

Getting access MSDNAA Software
Converting SDC Package to ISO Image Issue
Visual Studio 2005 Installation Issue



Computer Science
Mathematics
Hood College
IT Support

Google

Printing Friendly Format

Getting Started with Subversion

Subversion (a revision control system) is installed on pluto and wyrd. You can use the system for your project. This page explains the use of Subversion very briefly. You may want to look at "Version Control with Subversion" for further details.

Below is just an example. You can modify the directory structure the way you want.

1. Creating your Subversion repository

  1. Go to the directory where you want to create a repository.

    For example, if you want to create a repository in your home directory, type

    $ cd

    This brings you to your home directory.

  2. Create a repository.

    $ svnadmin create repos

    This creates the repos directory in the current directory.

  3. To create top-level directories.

    $ svn mkdir file:///home/username/repos/trunk file:///home/username/repos/branches file:///home/username/repos/tags -m "creating initial repository layout"

    Type all on one line and replace username with your login name above.

    This creates three top-level directories in the repos: /trunk to hold the main copy of the project where most development occurs, /branches to hold separate lines of development, and /tags to hold copies of the project as it exists at significant points of time, such as a release.

  4. To look at the directories just created.

    $ svn list file:///home/username/repos

2. Populating the repository

The followings assume that you have your project in the "my-project" directory and you want to bring it into the repository. The repository can be accessible locally and via the network. If you want to access your repository via network, you need to configure svn and ssh. Also you need Subversion client on your side, such as on the ht319 lab machines.

  1. Import your project to the repository.

    $ cd my-project
    $ svn import . file:///home/username/repos/trunk -m "importing myproject"

    This imports files in the "my-project" directory to your repository. -m option allows you to associate a message with this import.

  2. To look at the files just imported

    $ svn list file:///home/username/repos/trunk

  3. To delete a file or a directory from the repository

    $svn delete file:///home/username/repos/trunk/my-project -m "get rid of extra directory"

  4. To see the content of the file(s) you imported in the repository

    $ svn cat file:///home/username/repos/trunk/file_name

Basic Workflow

  1. To check out a working copy. The copy of the files will be managed by Subversion.

    For the local repository

    $ svn checkout file:///home/username/repos/trunk my_work

    If you configured svn and ssh to be connected via network, you can access your repository remotely.

    $ svn checkout svn+ssh://user@host_name/home/username/repos/trunk my_work

  2. To modify your working copy, such as editing files and modifying a directory tree, use the following commands.

    $ svn mkdir <target>

    $ svn move <source> <distination>

    $ svn copy <source> <distination>

    $ svn delete <target>

    $ svn list <target>

  3. To send your changes to the repository. The following command will create your directory if it does not exit.

    $ svn commit -m "comment here"

  4. To get information on the repository

    $ svn info

  5. When you are developing software as a group, you may need to update your working copy to the files modified by someone else. To bring changes from the repository into your working copy:

    $ svn update

Graphic Interface

A GUI frontend to the Subversion System, eSvn, is installed on the servers. If you have X Window System on your side, such as on ht319 lab computers or Cygwin/X, Exceed (Hummingbird), and MI/X (MicroImages) running on MS Windows, you can use svn with GUI. To start eSvn, log on one of the remote servers using ssh and type the following command.


      $ esvn &




Frederick, Maryland           E-mail:  w3admin @ pluto.hood.edu