0
votes

I'd like to execute a small clientside script/exe/bat after a successful repository export from TortoiseSvn.

The process would look like:

  1. Right click repository
  2. Click TortoiseSVN Export menu item
  3. Export sucessfully completes
  4. TortoiseSVN runs my script.

I've already looked at creating a custom client hook, but they're only available for start/pre/post-commit and start/pre/post-update, whereas I need post-export.

Any ideas?

3
this has to be transparent to the user. The user understands TortoiseSVN. They don't understand svn itself.Matt Jacobsen

3 Answers

1
votes

I don't think this can be done in Tortoise. As you already say, there are hooks, but not for exporting.

I'd say this calls for a script or batch file. SVN has its own command line client that you could use to do the export; You could check for a successful export using ERRORLEVEL:

export.bat

@echo off
svn export xyz
IF ERRORLEVEL 1 GOTO fail
IF ERRORLEVEL 0 GOTO success

:fail
echo Fail!
GOTO end

:success
echo Success! Now calling EXE file...
call my_exe_file_here.exe
GOTO end

:end

untested but should work.

0
votes

TortoiseSVN is open source

http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk
username: guest
password: [blank]

so you could add this functionality to the source, recompile, and distribute your modified version of TortoiseSVN to your users.

0
votes

One of the tortoiseSVN devs responded to my question on their mailing list.

http://groups.google.com/group/tortoisesvn/browse_thread/thread/e371b656f8615cf6#

Basically it currently can't be done in an integrated manner via the tortoiseSVN UI.

My solution is to have a little script that is itself in the repository. After an export through tortoiseSVN the user double clicks the script (that's also been exported to their chosen directory) and it does its magic.