Jean-Luc Thiffeault's Homepage

Using Subversion (SVN) and Trac

My current repository for SVN and Trac is at sd-2116.dedibox.fr.

Using Trac

If you do not need to modify the code for a software project or a paper directly, you can just browse the list of Trac projects. Some projects are password-protected, so you will need to get a username and password from me. Note that the SVN and Trac usernames and passwords are the same.

When you first log in to a new Trac project (one you haven't visited before), make sure to click on Preferences at the top right of the screen, and enter an e-mail address in your profile. You will then be notified of changes to tickets you raised or are responsible for.

The principal actions you can take in a Trac project are:

Tickets are the most important part of Trac: they allow a global view of what needs to be done for a project. When you create a new ticket, you assign it to yourself or another collaborator, who will then decide to accept it or re-assign it to somebody else. You can also add extra users who will be CC'd whenever a ticket changes. After posting responses and fixing what has to be fixed, a ticket is closed by marking it as resolved. If other users disagree, a ticket can always be re-opened!

The two most powerful aspects of Trac are (i) Almost everything can use Wiki formatting, so that bullet lists, font attributes, etc. can easily be created (even latex!). (ii) Trac Links can be used to cross-link throughout a project. For instance, write "ticket:3" anywhere (even in SVN log messages) and a link to ticket number 3 is automatically generated. Write [23] to link to changeset 23, or source:trunk/paper.tex to link to the latest version of a paper.

For more information see the Trac Guide.

Some tips:

Using Subversion

First, get a subversion client (command line: svn) if you don't already have one, which is available for all the popular platforms such as Linux, Windows, Mac, etc. On Linux distributions it can usually be installed via the package manager.

To "check out" (i.e., to get your own local working copy) of a project, just type

    svn co svn://sd-2116.dedibox.fr/rodent/trunk rodent
at the command prompt. Depending on access restrictions for a project, you might be asked for a username and password. (Note that the SVN and Trac usernames and passwords are the same.) Here the project name is rodent, and you are checking out ("co") the trunk of the project, that is, the main development tree. The last instance of rodent on the command line is the local name given to the directory, which you can call anything (for example if you want to check out multiple versions of the same code).

Now you can edit the files and make changes as usual. If you want to add a new file or directory, just create it as usual, and then

    svn add new_file_or_dir

Note that new additions don't get uploaded to the repository until you commit them, as described below.

To "commit" local changes once you're satisfied with them, use

    svn ci
If you haven't before this point, you will be asked for a username and a password, and an editor will pop up for you to enter a log comment. Write something descriptive, and a new revision is created (also called a changeset). Revisions are numbered consecutively and refer to the development tree as a whole, so referring to "revision 49" uniquely determines the state of the entire project repository.

To make sure you have the latest version when you return to a project that you previously checked out, execute the "update" command

    svn up
from within the local directory of your working copy.

Other useful SVN commands include

    svn stat
which gives "status report" of the current state of your local files (M = Modified, ? = not under version control), and
    svn diff
or
    svn diff paper.tex
which lists the differences between local file and the original file. It is also useful to view the change history (or log) for a file or directory:
    svn log paper.tex

Some tips:

Advanced Features

For more information see the Subversion Book.