1

I am working on the final configuration of write through proxy with replication. I have one master server and two slaves. The apache config works correctly but I am having problems trying to figure out what hooks need to be envoked so that replication occurs back to the slave. I can execute the svnsync manually from the master but I can't get it to work with the hooks.

on the slave I have an empty pre-revprop-change.bat, just exit 0. on the master I have a pre-lock.bat that issues an svn propdel command to free the locks on the remote repository. I also have a start-commit.bat that has the svnsync init and svnsync sync commands. When I do a commit the process just times out.

Any ideas to what I am missing?

1 Answers1

0

You have made your setup too complex. Once you've managed to initialize the svnsync process manually, all you need to add is the following line to your post-commit hook

/usr/bin/svnsync sync --non-interactive --no-auth-cache --source-username=XXX --source-password='XXX' --sync-username=YYY --sync-password='YYY' http://source/svn-proxy-sync/REPO 2>&1 > /dev/null &

Don't delete the lock on the -r0 property because if you make two commits with the above post-commit hook, the second commit could try and sync the repo while the first commit is still doing it in the background.

2>&1 > /dev/null is needed, otherwise the backgrounding of the svnsync doesn't work.

pdross
  • 730
  • 6
  • 6