views:

73

answers:

1

We need to perform some tasks when switching from one Subversion branch to another using TortoiseSVN. Is there any way to, say, call a batch file before and after the switch? The only thing I can find are pre-/post-update and commit hooks, but none of those get executed when switching between branches.

EDIT: I am looking for client-side hooks. TortoiseSVN has client-side hook scripts for pre-/post-update and commit, but nothing (that I can find) for pre-/post-switch. Initially, I thought adding hooks for client-side pre-/post-update would be executed when switching between branches, but this does not seem to be the case.

+1  A: 

Hooks happen on the server side; switching branches is essentially a fancy update method for the client. Since Tortise isn't a SVN server, I'm assuming this article sums up exactly your situation:

http://svn.haxx.se/users/archive-2004-06/0328.shtml

The batch file that does what you need would have to be executed locally instead of using TortiseSVN and it would have to do the local branch switching for you before or after your custom code, as necessary.

ifatree
There are client-side hooks in some clients like TortoiseSvn, but I'm not sure about switch operation hook.
Vitaly Polonetsky