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

Re: Post-Commit Hook Protocol (http, svn, file) in Tortoise SVN

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 19 Feb 2010 22:06:19 +0100

On 19.02.2010 18:31, Michael R wrote:
> I'll explain my whole situation to make this more clear.
>
> There is a defect-tracking application that I am working with. This
> application has functionality that can link to Subversion:
> -A user can enter a connection to Subversion (file:///, svn://, http://,
> etc.) and credentials to the Subversion repository
> -A user can then select a defect and click "Add Link"
> ...a window then opens in the defect application showing the
> subversion repository, and the user can select one or more files in
> the repository and click "OK"
> ...clicking "OK" then records some simple information about the
> selected Subversion file in the repository
> ...the users can then scan through defects and click on a defect
> and see which defects have been committed and against which subversion
> files
> -The information which is included is the "path" to the subversion
> file, it can be in a (file:///, svn://, or http:// format) and the
> revision number
> ...this is important because the defect tracking application has
> some simple functionality such as "Get History" on the subversion
> links
> ...(and yes, if the users enter things with file:/// then other
> users won't be able to Get History on those items, but they can set up
> Subversion however they wish)
>
> What lies above is set functionality that I cannot change. What I am
> interested in doing is adding to the functionality above.
>
> I want to add support to this for Tortoise SVN and allow commits made
> from Tortoise SVN to communicate back to the defect-tracking system
> and create these simple entries. What I have created now is an
> interface that talks to Tortoise SVN (that allows users to select
> defects through the Tortoise SVN commit screen) and a post-commit hook
> that relays the commited files and revisions over to the defect
> tracking system. I've also written a setup package that nicely
> installs all of this on 32 and 64 bit machines.
>
> Which leads back to my original question...it all works fine at this
> moment except for one problem: the files that are given to the hook
> by Tortoise after the commit are in a "C:\project\file.txt" format
> rather than the "http://server/file.txt" or "svn://server/file.txt"
> format that the defect system requires.
>
> One suggestions made above seemed to help for a bit (the bit about
> running the "svn.eve info" command on each item through the hook).
> This would work great for me except that I cannot rely on users having
> the SVN client installed on their machine...a machine might only have
> the Tortoise SVN client installed...I poked around looking at the
> Tortoise SVN client and it looks like the Tortoise client does not
> have an "info" command that matches the SVN one.
>
> What is my best course of action to allow my hook to hand off the list
> of committed files (post-commit) to the defect tracking application in
> a http://, svn://, or file:/// format?

You should implement an issue tracker plugin:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-ibugtraqprovider.html

Here are some plugins that already work, some of them open source so you
can check how they did it:
http://tortoisesvn.net/issuetrackerplugins

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2449405
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-02-19 22:06:30 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.