Search code examples
gitbranchtrac

How to browse git branches in Trac 1.0?


I set up Trac 1.0, added the entry tracopt.versioncontrol.git.* = enabled to [components] and used the Admin panel to add my repository. While branches show up in the timeline, the source browser does not provide means to browse a different branch, tag or revision like e.g. here (that site uses Trac 0.12 with the GitPlugin, which has been included into 1.0). Is there a setting I missed or does the 1.0 git integration lack this feature? The ?rev=... parameter is simply ignored when entered manually.


Solution

  • It should work, but slightly different than the GitPlugin. They allow all kinds of repositories at the top level now. So you need to click on the top-level repo name, and then you'll see the "Visit" dropdown box appear near the top of the page. That will allow you to select a specific branch or tag.

    You can see this in Trac's own repository. The browser takes you too the top-level, and shows a series of repositories. Now click on one. For example, cboos.git. You should see the "Visit" dropdown and be able to pick a branch.