Welcome to Trac2SVN

Trac2SVN seamlessly integrates issues recorded and managed in Trac with file changes held in Subversion repositories. Trac2SVN is designed to enable the developer to work using the client and platform of their choice and it supports your existing Change Control process using Trac.

This User Guide gives an overview of the product and instructions on how to work with the Trac2SVN Client. For installation, configuration and troubleshooting, please refer to the Administration Guide.

A Trac2SVN system consists of the elements shown in the following diagram. Typically, as a Subversion user, you will only be concerned with the client piece. Your Administrator will have configured various options for you (you can find more the possible options in the Administration guide).

trac2svn_overview.png

Using Trac2SVN

Everyday Use

There are 2 user ids that are significant, the id you use with Subversion and your Trac user id. Both of these need to be set in your Trac2SVN client config file.

Normally, your system administrator will have configured your system to run the Trac2SVN client on login. If this is not the case, please start the Trac2SVN client manually.

When you commit changes in Subversion (you can use any Subversion client) to a Trac2SVN-enabled repository, Trac2SVN will open a window on your machine, allowing you to choose from a list of Trac tickets.

select_ticket.png

Select a ticket from the list and Trac2SVN update the tickets selected in Trac so that the changes can be easily tracked. Trac2SVN will also add a revision property to Subversion, which gives you a reference back from a Subversion revision to Trac tickets ids.

If your Trac2SVN administrator has enabled the option to move tickets to their next state, the ticket-selection dialogue will look as follows, allowing you to select tickets or to select tickets and move them to the next state at the same time. Click once on the tick box next to the ticket to select it, twice to move to the next state or three times to deselect again.

move_ticket.png

When you create an association between a Trac ticket and a Subversion commit with Trac2SVN, the following information is added to the Trac ticket. This gives you details about the change that has been applied in Subversion. The item starting with changeset: is a Trac wiki link to the Subversion changeset. If you follow this link, you can view the changes applied by the changeset using Trac's Subversion plugin.

trac_ticket.png

Starting the Client Manually

We recommend that you start the Trac2SVN Client automatically on logon (see the Administration Guide for details). If you choose not to do this, you can easily start the client manually with the configuration of your choice as follows:-

c:\Program Files\Clearvision\trac2svn\client\trac2svn_client.exe -f c:\my_trac2svn.cfg

or, on Linux:

/opt/Clearvision/trac2svn/client/trac2svn_client -f ~/.trac2svn.cfg

Working on Multiple Projects

Starting the client manually (as above) can be useful if you are switching between multiple projects, and hence have to use multiple Trac servers. In this case, you should set up a set of config files, each configured for the correct Trac2SVN server (and hence Trac server) of each project. Note that you can run multiple clients on the same machine.

Using this configuration, Trac2SVN tracks the changes in all the Subversion repositories and helps you select issues from the related Trac database.

Tracking Changes

Trac2SVN provides bi-directional tracking, enabling you to track the Subversion changes from within Trac, and correlating Trac records from within Subversion.

In Trac, you can simply open a ticket and see the history of your changes relating to this activity in the ticket's comments.

In Subversion, you can interrogate a revision's clearvision:change_id property. This holds a list of the Trac records which relate to a change/commit. So, for example, to see which tickets relate to the latest change, you can use the following command:-

svn proplist -rHEAD --verbose --revprop .