I’m using Trac to manage my projects. Some guys have to take a regular look to my wiki pages to watch changes in a special file. Therefore I have a link on my wikipage. Something link this:
[source:MyRepository/trunk/subfolder/file.pdf@head The file to read]
What I would like to have is the following output:
The file to read (last commited: 11/01/15 at 08:52am)
Any ideas how to manage that in trac wiki?
You will probably have to write a small plugin for that, something like the following:
(For Trac 0.12 or later, error handling left as the dreaded exercise to the reader.)
Place this in a file file named
source_link.pyin thepluginsdirectory of your Trac environment. Then you can reference your files with the following macro:or if you want a specific label: