Run exe after successful svn export from TortoiseSVN

svntortoisesvn

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?

Best Answer

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.

Related Topic