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.
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 :-)
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...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon May 15 16:45:30 2006