[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: Roger Lipscombe <roger_at_differentpla.net>
Date: Fri, 01 Feb 2008 15:03:56 +0000

Alexander Klenin wrote:
> First, the hook already takes %PATH% argument containing a list of paths to
> be committed, so it is possible for the hook to display them along
> with issues list.
>

I've finally got around to looking at this properly, and I'm going to
press ahead with having a button on the commit dialog. I think that
Alexander's solution of using a client-side pre-commit hook is a good
fit for some scenarios, but it doesn't work for us: We need to see the
list of changed files and to be able to see the diffs before choosing
which issue is being worked on.

Rather than reimplement the commit dialog in our hook, it seems simpler
to snap in to the existing commit dialog.

Here's my plan. Feel free to take pot-shots at it:

1. The issue tracker hook is defined in exactly the same way as the
other client-side hooks. You can use %PATH% %PATHS% and %MESSAGEFILE%
parameters.
2. If an issue tracker hook is defined for your working copy, it
overrides the bugtraq: behaviour in the commit dialog, and places a
button in the top-right of the commit dialog. This is for two reasons:
Firstly, I figure that you won't need both; secondly, that space in the
top-right of the dialog is mighty attractive. I'm not sure how to define
the text on the button. Any ideas?
3. If the user clicks on the button, TortoiseProc creates a temporary
file containing whatever text is already in the log message field. It
then runs the configured hook, passing the name of this temporary file
as %MESSAGEFILE% on the command line.
4. The hook does whatever it needs to do to ask the user about what
they're working on and what they've done. It places this information in
the temporary file, in whichever format desired (i.e. so that it can be
parsed by the post-commit hook). It then exits, returning zero (i.e.
success). If it returns a non-zero value, it's assumed to have failed.
5. If it succeeded, TortoiseProc takes the text from the temporary file
and puts it in the log message field, overwriting whatever was already
there (we passed the original text to the plugin, so it has the
opportunity to preserve it).
6. TortoiseProc deletes the temporary file.

I hope to have a patch available for discussion in a day or so.

Cheers,
Roger.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-02-01 16:04:16 CET

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.