How to use Trac and SVN together, how do I know if a file is for a specific ticket?

For example, a file has been modified to run a promotion ticket, what I want to do is associated with the transferred file to the ticket. How to use Trac and SVN together, how do I know if a file is for a specific ticket? Is it possible?

Thanks.

+6
file svn commit trac
source share
3 answers

As stated in TracWiki , the intended workflow is:

  • Trac user starts work on ticket
  • They get the code from the version control system.
  • Upon completion, they commit their changes to the version control repository
  • User inserts Trac ticket number in commit message as TracLink
  • Trac can now display a set of changes for a ticket

If TracLink has the value #1 or ticket:1 or even comment:1:ticket:2 when referring to tickets.


If you missed the link creation when committing, you can still create it in the comments of the tickets themselves, using TracLinks like: r2 , r1:3 , [1:3] , log:@1:3 , etc.

+6
source share

you can refer to the revision when closing the ticket: r253 , for example,
and you can refer to the ticket in a commit message: #7525 , for example.

Other than that, I doubt that anything can be done.

Obviously, you can parse the log message with the on-commit hook and make a notification about sorting the tickets of interest again, but you will need to have access to the server, which I assume.

+2
source share

You can use the Trac post-commit hook. It allows you to close tickets using your commit journal messages. See the script here .

+1
source share

All Articles