[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

post-commit REPOS var empty

From: Toni Price <zapcat3_at_yahoo.co.uk>
Date: 2004-11-16 14:54:19 CET

I have just attempted to compile and install Subversion 1.1.1 on SUSE
Linux 9.1 and it seems to be working but I'm having a problem with a
post-commit hook. I've got the following post-commit script called
'post-commit':

    REPOS="$1"
    REV="$2"
    echo ${REPOS} >> env_vars.txt
    echo ${REV} >> env_vars.txt
    (cd /home/srv/svn/hook_scripts; ./hot-backup.py ${REPOS} \
      /bak/svn/hotbak &)

I've put it in the relevant 'hooks' directory and made sure it has
execute permissions. There's a copy of hot-backup.py in the location
referred to (i.e. /home/srv/svn/hook_scripts/hot-backup.py exists) and
the scripts are owned by the same user as the Apache webserver (wwwrun).

If I try to run the script with the following command:
    $ sudo -u wwwrun ./post-commit

It starts running and prints the following to the console:
    Usage: hot-backup.py <repos_path> <backup_path>

Then it hangs and I need to Ctrl-c.

So I put in the "echo ..." lines to try and test what the values of
$REPOS and $REV are when the script gets called. Curiously, they seem to
be empty, which would explain why hot-backup.py is failing like that.

I couldn't seem to find any information (on the mailing lists or from
searching the Internet) showing other people might have had the same
sort of problem - so I have no idea what I may be doing wrong.

Any pointers would be appreciated ...
Thanks,
Toni

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 16 14:56:52 2004

This is an archived mail posted to the Subversion Users mailing list.