开发者

How can I provide a more robust link between SVN commits and tickets

开发者 https://www.devze.com 2022-12-09 11:43 出处:网络
I\'m just trying to hook Trac/SVN together so that my SVN commits manage my Trac Tickets.I\'ve read the documentation and understand (kind of) that the ticket updates rely on a dev using the correct s

I'm just trying to hook Trac/SVN together so that my SVN commits manage my Trac Tickets. I've read the documentation and understand (kind of) that the ticket updates rely on a dev using the correct syntax in the comments field which not to put to fine a point on it I think is um... lets use the world unreliable to avoid offending anyone unnecessarily :P

I'm looking at adding a custom field to do this which won't require knowledge of specific syntax in order to update the tickets. The only issue is, I don't have the first clue where to start... I've never e开发者_如何学Pythonven programmed in Python before and while I can kind of interpret what's going on in any given script, I don't want to have to learn the whole language just to integrate the two systems together more robustly.

I have very little *NIX experience, I'm a Microsoft Developer so having to hack all these technologies together via the command line, scripts and configuration files is an environment that's somewhat alien to me.

So has anyone modified Trac/SVN in this fashion or done anything like this before and if so, is there a document or helpful user somewhere that would walk me through this process?

Edit: Should I be considering modifying my SVN client integration to make this process more intuitive for the developer rather than modifying the link between SVN/Trac? Perhaps this would be a more suitable route?


Pre-commit hooks to check that the syntax of the commit message corresponds with a valid ticket using regular expressions is your best bet. Found a blog entry here that points to most of the relevant sites blog entry


I'm a bit late to this party, but is a very useful page that details exactly what you're talking about.

It allows you to set a property that highlights the bug number and turns it into a hyperlink to the bugtracking page when viewed in tortoisesvn (using regular expressions and svn properties). Also say you can get/develop plugins for tortoisesvn which allow you to pick a bug from a list. There's probably one for trac, but I don't know where it is or how good it is.

Combine either of these with the server side hook to disallow committing without the bug number, and you've got a pretty good system.

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-bugtracker.html

Update: A quick google reveals that TracExplorer may be your best bet for this.


You should get this for free with trac, simply include the ticket number in your SVN message:

svn commit -m "#635 bugfix"

trac would recognize that the commit belongs to ticket #635 and should make the link, what else do you want the "link" to do? automatically close the ticket?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号