2

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 :)

icasimpan
  • 1,253
  • 3
  • 16
  • 28
  • I found this documentation that pre-revprop-change hook must be present and executable. Otherwise, post-revprop-change won't work http://svnbook.red-bean.com/en/1.4/svn.ref.reposhooks.post-revprop-change.html but still the same issue, can't even trigger pre-revprop-change even if it's executable :( – icasimpan Jan 25 '11 at 05:19
  • 2
    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](http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html#svn.ref.properties.unversioned-props) in the manual – Rup Jan 25 '11 at 12:08
  • 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 Jan 26 '11 at 02:20

1 Answers1

1

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

icasimpan
  • 1,253
  • 3
  • 16
  • 28