Home · Blog · Talks · Projects

Trac Secret

We’ve been using Trac at Reevoo since I joined the company over 2 years ago. In the main, I’ve been pretty happy with it – it’s not fancy, but it does basic stuff tolerably well. However, I’ve always found it annoying that I couldn’t easily find a file/directory which I know used to be in our Subversion repository, but has been deleted.

I’m sure most people already know about the following feature of Trac, but just in case it’s useful to somebody else…

A couple of days ago, I had a small “aha” moment, when I decided to actually read an error page that Trac produces if you try to hack the “browse” url to navigate to your deleted file…

http://wiki/trac/browser/mocha/trunk

You see something like the following…

TracInternalError

My attention has always been drawn to the line of highlighted text, which indicates that the file has not been found, but the line underneath includes a link to “search in the repository history to see if that path existed but was later removed”. If I click that link, lo and behold…

TracLogSearch

I can now see the directory I was looking for and its history, including the changeset in which it was deleted. What’s more, it has a nice hackable url…

http://wiki/trac/log/mocha/trunk?rev=7034&mode=path_history

The moral of the story is that you should always read error messages carefully!

Contact · History · Colophon · Links