Trac on Snow Leopard

By: | Post date: March 4, 2010 | Comments: No Comments
Posted in categories: Cocoa
Tags: , ,

I love Trac, but am moving my scm to git (instead of Subversion). My problem is getting a functional install of Trac with the git-Trac plugin working on my remote server. To solve that problem, I’m going to make sure first that I can get a fully functional version running locally. Here are my notes….Starting point


Python : I’m running version 2.6.1 that is included in Snow Leopard.

SetupTools :

$ svn co

$ cd setuptools

$ sudo python install

Genshi :

$ easy_install Genshi

Subversion : I’m already running version 1.6.5

Trac Install

$ sudo easy_install Trac

Test it out with:

tracd –port 8000 /Path/to/Trac/Porject/Site

Everything looks good, but I want the latest version, not version 0.11, so….

$ sudo easy_install –upgrade Trac

And now everything looks good. Time for new territory with GitPlugin.


Download the source.

$ python build

$ sudo python install

Enable the plugin in the trac.ini file for the site:


# for plugin version

tracext.git.* = enabled

Point the trac at the git repository:


repository_dir = /var/git/Test.git

repository_type = git

## the following is only for the 0.11 branch


## let Trac cache meta-data via CachedRepository wrapper; default: false

##cached_repository = true

## disable automatic garbage collection for in-memory commit-tree cache; default: false

persistent_cache = true

## length revision sha-sums should be tried to be abbreviated to (must be >= 4 and <= 40); default: 7

shortrev_len = 6

## executable file name (optionally with path) of git binary; default: ‘git’

git_bin = /usr/local/libexec/git-core/git

NOTE: the Test.git above needs to be the .git repository directory (i.e. the one containing the file HEAD and config), not the working tree directory that holds the .git/ folder.

Enabling the cached_repository causes an error on Mac OS X 10.6. Not sure why.


I now have an instance of Trac running locally via tracd with git repository support. I’ll look at running it under Apache later.