[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue Tracker Integration

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2008-01-02 14:23:52 CET

Roger Lipscombe wrote:
> (Posting this here, rather than on users@, because I’m actually willing
> to do some of the work…)
> We’re currently using the bugtraq: stuff to enter ticket numbers in our
> commits. Our current issue tracker doesn’t have an API (we’re looking at
> replacing it with one that does), but I’ve played with Trac’s
> post-commit hook stuff, and it all works brilliantly.
> However, we’ve got a requirement that completes the circle. We’d like to
> enhance the TortoiseSVN commit dialog so that it can present the user
> with a list of their assigned tickets. Selecting the appropriate ticket
> would copy the relevant information into the commit dialog, along with
> the ticket number. The post-commit hook would then go back to the issue
> tracker to annotate/close the bug.

This has come up several times on the mailing list already. But I never
found the time to do it.

> I’ve had a quick poke around in the source code (I’ve not got it
> building yet, though; still have to install NAnt), and it looks like I’d
> need to change TortoiseProc. I’d like to implement this in a relatively
> generic way, so that we can contribute the changes back, rather than
> have to maintain separate patches to TortoiseSVN.

Yes, you have to implement this in TortoiseProc.

> What I’m thinking is this:
> Instead of a label/text box for the ticket number, present the user with
> a button or hyperlink that pops up another dialog. This dialog is
> defined by an inproc COM object that implements a defined interface.
> This COM object is responsible for talking to the issue tracker, and
> displaying all of the necessary UI. When the user has selected the
> relevant issue(s), the COM interface returns a string which is put into
> the commit message text box, for further editing.

Previous requests like this suggested that the issuetracker itself would
provide all the open/assigned issues as an xml file which TSVN should
then parse and show to the user. But of course, using COM isn't a bad idea.

> The COM object would be associated with the project by having a new
> “bugtraq:clsid” or “bugtraq:clsid” property, in the same way as you
> might use the “bugtraq:url” property. It would be passed the other
> bugtraq properties (or even all of the properties, including “inherited”
> ones). There would hopefully be enough information in these to identify
> the project in the issue tracker.

One problem you have to consider: how would you know the *user* to ask
the issues for? Because the username for the commit is not known at that
stage of the commit operation.

> So, my question: Has anyone done any other thinking about this? Is my
> idea sound, or does anyone have a better idea?

Your idea is good. But I guess you'll soon discover some problems (like
not knowing the username beforehand).
Also you have to make sure that if the issuetracker is not responding
for whatever reason that the user still can cancel the dialog or go on
with the commit.

> If I get at least some positive encouragement, I’ll encourage my boss to
> allocate me some official time to work on this.

That would be great. But before you start coding, please send us your
ideas on how the COM-Interface should look like and how you want to
proceed (once you've made yourself familiar with the code a little bit).
It's an open source project after all, and we like to comment early on
for big tasks.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 2 14:24:20 2008

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.