2

TortoiseSVN hangs (freezes) on "Sending content" when I use a post-commit hook on my VisualSVN repository. The following is the hook:

cd C:\Sysinternals\

PsExec \\\OtherComputer TortoiseProc /command:update /path:"C:\MyPath\" /closeonend:4

The content is sent, but a local update is required or it is marked as out of date. Any ideas?

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
Chris
  • 21
  • 1
  • Can you commit successfully with the command line client? – Álvaro González Jul 15 '11 at 16:54
  • Using /command:commit just brings up the Commit GUI. Is there another method? But, no, using /command:commit results in the same behavior. Thanks for the formatting help, by the way. – Chris Jul 15 '11 at 17:00
  • I mean the [command line client](http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.commit.html). Grab it at http://www.sliksvn.com/en/download if you don't have it already. – Álvaro González Jul 15 '11 at 17:15

2 Answers2

2

The hook script has to finish first to make the commit succeed. So the client has to wait for that. If your hook script takes too long or doesn't finish at all, then the commit appears to hang. You can try to start the long-running command in your hook script in a separate process so that the hook script itself finishes immediately.

However: if OtherComputer is the computer you're trying to commit from and the script tries to update the very same working copy, then that won't help either: the update has to wait until the commit is finished, but the commit waits for the hook script running the update to finish - you've got a deadlock.

Stefan
  • 43,293
  • 10
  • 75
  • 117
1

This looks like a local hook. I don't think you can use PsExec like that. I think you're opening the PsExec session on the other computer, and it just sits there. It doesn't have a way to see the next line in the script. i.e. the TortoiseProc isn't fed into the PsExec.
I think you need to install the SVN client (command-line client) on the other machine. Then make a bat file (updateme.bat), place it on that machine, then you can do something like this (all one line):

c:\sysinternals\PsExec \\OtherComputer c:\updateme.bat
Chris Thornton
  • 15,620
  • 5
  • 37
  • 62