On Nov 30, 2007 12:28 AM, Himanshu Raina <raina_himanshu@yahoo.com> wrote:
> Hi Hari,
>
> The details are as follows
>
> Master SVN - host1
> /usr/local/svn/test - repository
>
> drwxrwx--- 7 svn apache 4096 Nov 28 15:57 test
>
>
> Mirror SVN - host2
>
> drwxr-xr-x 6 svnsync svngrp 4096 2007-11-28 12:57 svnsync
>
> Created the mirror on host2 by first creating svnsync user and
> synchronizing the data between master and mirror.
>
> On master did the following
>
> svnsync init --username svnsync svn+ssh://svnsync@host2/home/svnsync/svn file:///usr/local/svn/test
>
>
> svnsync synchronize --username svnsync svn+ssh://svnsync@host2/home/svnsync/svn
>
> Since all the transactions are being done at the master svn server the post-commit
> and post-rev-changes hooks are present on the master svn
>
> post-commit hook -
> /usr/local/bin/svnsync synchronize --username svnsync
> svn+ssh://svnsync@host2/home/svnsync/svn &;
>
> post-rev-changes
> /usr/local/bin/svnsync copy-revprops --username svnsync
> svn+ssh://svnsync@host/home/svnsync/svn $REV &;
>
> Now whenever the changes are done in the master svn repository
> the changes don't get mirrored to the mirror svn. As a workaround
> i make use of cron. Has it got something to do with permission on
> the hook scripts.
>
> -rwxrwx--x 1 svn apache 176 Nov 28 12:45 post-commit
> -rwxrwxr-x 1 svn apache 184 Nov 28 12:45 post-revprop-change
>
>
Do you know if the post-commit/post-revprop-change is getting executed at
all? Please try to debug it (
http://subversion.tigris.org/faq.html#hook-debugging) and make sure that it
is getting executed. If it is getting executed, then try to redirect stdout
and stderr to a file to see what is going on.
Also, I guess you also need 'r' permission for others for the post-commit (
i.e., chmod that file to 775).
>
>
> regards
> Himanshu Raina
>
> *Hari Kodungallur <hkodungallur@gmail.com>* wrote:
>
>
> On Nov 27, 2007 11:10 PM, Himanshu Raina <raina_himanshu@yahoo.com> wrote:
>
> > Hi,
> >
> > I have setup SVN mirror and it seems to be working absolutely fine. The
> > problem is the hook-scripts which aren't invoked whenever a commit is done
> > to source repository. The same works fine if i put the entries in the cron.
> > Is there a way to overcome this problem or crontab is the only way out.
> >
>
> Can you be a little more specific? Are the hook scripts not working only
> in the mirror? Or is not working in the main server as well as in the
> mirror? Somehow from your email subject and its body it seems like the
> problem is related to svn mirroring, but it is not clear how. Please explain
> how you created the mirror etc and where the problem is.
>
> The hook scripts are not supposed to be run as cron. They are run in the
> context of a transaction (pre or post).
> Please read the following link to debug your hook scripts.
>
> http://subversion.tigris.org/faq.html#hook-debugging
>
> Thanks,
> -Hari
>
>
Received on Fri Nov 30 17:48:12 2007