0

This is my post-commit hook in vm01 repository 'repos':

#!/bin/sh
#/var/www/svn/repos/hooks/post-commit
# Include the below line for each slave in the environment
echo "Im gettting called"  >> /var/log/httpd/svnsynclog
/usr/bin/svnsync sync http://vm02/repos >> /var/log/httpd/svnsynclog 2>&1 &

Sync process doesn’t take place automatically ‘post commit’. Here are the observations:

  • Initially vm01 and vm02 have revisions x and 0 respectively for repository 'repos'.

  • I performed a commit, vm01 has revision (x+1) and vm02 has revision x.

  • In svnsync log, there is no error. Even after writing an echo redirected towards this log, there isn’t an entry. Therefore I believe post commit hook isn’t getting triggered after I publish.

  • If I manually run post commit, sync happens. vm01 and vm02 both will have (x+1) and (x+1) revisions.

  • I gave full permissions, checked owner etc, I even moved the post commit templates out of hooks directory, but still post-commit hook isn’t getting invoked.

Any other detail I'm missing?

AvidLearner
  • 4,123
  • 5
  • 35
  • 48
  • Just double check: did you give execute permissions for this file? chmod a+x /var/www/svn/repos/hooks/post-commit – Sergey Azarkevich Jun 16 '15 at 14:19
  • Yes i did Sergey. I have configured post commit script, post-revprop-change script on vm01 and pre-revprop-change on vm02 as follows: – ripudamanrs Jun 17 '15 at 06:45
  • post-revprop-change script (/usr/bin/svnsync copy-revprops http://vm02/repos >> /var/log/httpd/svnsynclog 2>&1 &)on vm01 pre-revprop-change on vm02 (with only exit 0) – ripudamanrs Jun 17 '15 at 07:02

0 Answers0