pre-revprop-change hook either failed
Asked Answered
S

4

16

I don't know if this hook is out-of-box or if mine is just messed up and I just need to replace it but when I go and try to edit a log comment on a commit I get this error message:

DAV request failed; it’s possibly that the repository’s pre-revprop-change hook either failed or is non-existent
At least one property change failed; repository is unchanged
Error setting property ‘log’

I'm using Tortoise v1.6.7 but have had this problem all along since I installed Tortoise, just never looked into it but it's extremely annoying.

So I found this article.

However since I can't figure out how to do svn command line calls with Tortoise, I simply went into the repository and opened up the pre-refprop-change template and below is what's in it.

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

if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi

echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1

So still trying to figure out how to change this so that Tortoise (subversion that is) allows me to edit comments. Why would one desire to edit comments? Because there are many times I f'd up and forgot to add more comments after a commit after I realized I missed x,y,z that should have been in the comments after the fact. Happens to anyone. While it's a security risk to allow developers to do this, we back up our repository every 2 hours so if anyone goes through and deletes them, oh well, I am willing to take that risk as we have this backed up. That risk should not overshadow the ability to fix comments at will.

Schluter answered 25/2, 2010 at 15:51 Comment(1)
G
26

if your repository is on a windows machine, simply create a file named pre-revprop-change.bat and add the line

exit 0

in it.

Goshawk answered 25/2, 2010 at 16:18 Comment(4)
Interesting, I'm not a command line guru. What is that doing, ignoring the template completely?Schluter
maybe you can also help me with a .bat that forces x chars to be entered in any comments my developers make?Schluter
This is a slightly shady solution - the OP was primarily looking to allow changing comments, not changing authors, deleting comments, etc etc.Malcah
@Goshawk - where do I place this file ? More importantly, what does it do ?Substandard
L
25

Just a little follow-up to Stefan's excellent answer for those using VisualSVN Server.

You can follow these steps:

1.) Start your VisualSVN Server Management Console.

2.) Right-click on your repository-of-choice and select "Properties":

enter image description here

3.) Select the "Pre-revision property change hook" and click the Edit button:

enter image description here

4.) Enter your script, the smallest possible would be the exit 0 that Stefan suggests:

enter image description here

5.) Close all dialog boxes with OK and then you are done.

The next time you change the log message it should succeed.

Lashelllasher answered 6/3, 2013 at 15:0 Comment(0)
S
3

If you are using an online svn hosting service like assembla, then use the instructions given by Uwe Keim to guide you. You only need to find your svn settings somewhere the the svn hosts website.

For assembla > go to your project > svn tab > settings > server-side hooks in left menu > look at "Available pre-revprop-change hooks" > click the install button next to it > click on the svn tab to get back to your project.

Substandard answered 26/1, 2015 at 6:16 Comment(1)
In 2019 Assembla allows tuning this setting via its UI: ... SVN > Settings > General Settings > Enable changing svn:log propery for existing revisionsPoinciana
L
0

Create a bat file using only "exit 0". Remove all other rem'ed lines. Save it to Path\Repositories\hooks folder as "pre-revprop-change.bat" and try re-running.

exit 0

Leanaleanard answered 16/10, 2017 at 17:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.