pre-revprop-change hook either failed
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:
开发者_如何学GoDAV 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.
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.
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":
3.) Select the "Pre-revision property change hook" and click the Edit button:
4.) Enter your script, the smallest possible would be the exit 0
that Stefan suggests:
5.) Close all dialog boxes with OK and then you are done.
The next time you change the log message it should succeed.
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.
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
精彩评论