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

Re: Scripting TortoiseSVN - COM interface?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2006-05-16 09:23:37 CEST

On 5/15/06, Kevin Puetz <puetzk@puetzk.org> wrote:
> I've been looking again lately at ways to let external scripts take
> advantage of the TortoiseSVN's dialogs/progress dialogs/etc (and
> apparently I'm not alone, given the "Hijacking TortoiseProc" thread
> recently). Since it's difficult for TortoiseProc to return any output
> in it's current cmdline form (and in any case parsing cmdline output
> is a rather inconvenient way to interact), I've been looking into
> adding a COM automation interface. The attached patches are by no
> means useful yet, but they do work and show what kind of impact on
> the "core code" adding COM interfaces requires - not much, really.
> TortoisProc-ATL.diff - the boilerplate to use ATL at all.
> TortoiseProc-COM-Interface.diff - adds a skeletal COM interface/
> implementation that can bring up the About or Log dialog.

Looks good.

> With both of the above built-in, and after registering the result
> (with TortoiseProc.exe /register), one can make calls like the
> following in VBScript, or (with with the obvious syntax differences)
> any other language that supports COM - python, perl, C++,
> matlab, .NET, etc.
> Set turtle = CreateObject("TortoiseProc.TortoiseSVN")
> call turtle.About()
> call turtle.Log("http://tortoisesvn.tigris.org/svn/tortoisesvn/
> trunk/",0,,,True)
> Obviously, there's nothing in the interface yet that isn't already
> available via the command-line, and not much of that; this is just a
> strawman to start the discussion about even having a TortoiseSVN
> "API". If we're favorable on that, then we need to work out what it
> looks like :-)

Since the whole point of using COM over the command line is to pass
data from TSVN to the calling application, can you provide an example
on how we would to that?

> I'm specifically wanting to expose the ability to use the log dialog
> to select from a (potentially discontinuous) set of revisions, so
> that I could create a TortoiseSVN GUI wrapper around svnmerge.py
> avail/block/merge.
> "Hijacking TortoiseProc" wanted to use the repo-browser to pick URLS.
> Others probably also have desires to throw in - if you do throw 'em
> in and I'll try to keep them in mind as I draw up an API outline...

But we have to draw a clear line about what we will support and what
not. I'm concerned that people will want more and more functions
exposed. And I'd like to avoid implementing the whole Subversion API
via COM. There already is a public COM binding available for that.

So, how would you suggest which functions of TProc should be exposed?
Would you like to work on this yourself? You could work on this on a
separate branch...


  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue May 16 09:23:50 2006

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.