2
votes

I have created post-commit and pre-commit hooks in subversion before but I cannot seem to successfully trigger a post-revprop-change hook.

Here's how I post-revprop-change hook (and that's executable by the svn user):

#!/bin/bash

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

TRIGGER_DB='/path/to/repo/hooks/trigger_record.txt'

/bin/echo "post-revprop-change/$REV/`/bin/date`" >> $TRIGGER_DB

Then from a local working copy of "repo", I added an svn property as follows:

 ~icasimpan$ svn propset test "this is only a test" .
 ~icasimpan$ svn ci -m"added test property"

Given that I have an executable post-revprop-change hook in the repo server, I was expecting to get a record in /path/to/repo/hooks/trigger_record.txt...but I didn't.

Can anyone help me out please?

Thanks in advance,

Ismael Casimpan :)

1
I found this documentation that pre-revprop-change hook must be present and executable. Otherwise, post-revprop-change won't work svnbook.red-bean.com/en/1.4/… but still the same issue, can't even trigger pre-revprop-change even if it's executable :(icasimpan
That's not a revprop edit. Try svn propedit --revprop -r 1 svn:log. Revprops are the things you see in svn log - the commit date, the log message, etc. See Unversioned properties in the manualRup
Oh, I see. Thanks for helping me out Rup. Don't know how I could vote for your answer though as this seems to be a gray area in the documentation of svn that would surely trip other people...That explains why the post-revprop-change hook didn't work...I also thought this is the right hook to use when I need to be on the lookout for unversioned properties which was my original intention...need to keep on looking again :)icasimpan

1 Answers

1
votes

This answers my question(see the original from Rup):

That's not a revprop edit. Try svn propedit --revprop -r 1 svn:log. Revprops are the things you see in svn log - the commit date, the log message, etc. See Unversioned properties in the manual – Rup yesterday