0
votes

I'm looking to update Trac on my server to include a testing step in the workflow. I've managed to do this in Trac but I need to change the svn commit to move the status to 'testing' instead of moving it to 'closed'.

I've read that I need to change the commit_updater.py file but I don't know how to do this. I've tried checking out the Trac code, editing the commit_updater.py file and installing it on the server using the command:

C:\Trac_0.12>C:\svn\trac\python\python.exe setup.py install

but I'm getting the following error on the install....

File "C:\svn\trac\python\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\egg_info.py", line 233, in get_svn_revision

IndexError: list index out of range

By the way, I'm using VisualSVN server with their version of Trac.

Alternatively... Does anyone recommend an alternative to using Trac with SVN? I thought it would be simple enough to change the post commit hook to move a ticket to 'testing' instead of 'closed' but this is proving to be very frustrating! Any help with this would be very much appreciated.

Thanks.

1
Try installing Trac from source without any modifications and see if you get the same error. If you do, then it's likely a problem with your build/install process. If you don't see the error, then edit your question and add a diff of the changes you have made.bta

1 Answers

0
votes

Obviously only bare comments (see *commands_refs* config option) and resolution (see *commands_close* config option) are implemented by now. Maybe due to the fact, that the TracWorkflow is highly configureable on it's own, so there are likely very different expectations for commit-triggered workflow actions too.

It shouldn't be too hard to implement by following the existing logic. You'll want to

  • extend the *commit_updater.py* by a *cmd_workflow* or similar state changing logic following existing *cmd_close* (maybe you'll want to make the ticket state to change to configurable as well)
  • add suitable trigger commands by means of a related *commands_workflow* option
  • ...

That said, you didn't show any code (changes) here, but the IndexError seems largely unrelated to the topic. It's about properies of the SVN repo, I guess. Better watch out for anomalies/inconsistancies there before blaming Trac, i.e. see this Trac ticket.

On your second question: The world is big and fortune is bright, if you know how and where too look. Because I'm a Trac guy, don't expect many pointers to alternatives outside Trac. But Redmine is often referred to as an alternative tracker. Better? Don't know, different.

After all it's exactly sensible to ask for help and ask for (better) alternatives at the same time, right? Don't be so naive as to think, that another system that may allow for easier SVN commit action customization will be superior over Trac in many other aspects where Trac provides great, matured and low-fuss functionality.