pre-revprop-change hook in TortoiseSVN

11,736

Solution 1

Sorry, I misunderstood your question in my original answer.

In order to use the svn propedit command on a revision properly (like svn:log which is the log message property), you do need a pre-revprop-change hook, because the default behaviour is to deny revision property changes. The easiest way to add a pre-revprop-change hook is to make a copy of the pre-revprop-change.tmpl file (which you'll find in /repository-name/hooks in your svn directory), call it pre-revprop-change and make it executable (chmod a+x).

After you run your propedit commands, you can either remove the hook to revert to default behaviour, or change it to always exit with a non-zero return code.

Solution 2

Another option is to use svnadmin to change the log message:

echo "My new commit message." > newmsg.txt
svnadmin setlog path/to/repository -r nnn newmsg.txt --bypass-hooks

where nnn is the revision number.

Share:
11,736
Admin
Author by

Admin

Updated on July 15, 2022

Comments

  • Admin
    Admin almost 2 years

    Total newbie to TortoiseSVN here. I need to change a log message for some commits I made to subversion. I only want to make my changes and then have everything go back to the way it was before, meaning you can't change anything after the commit.

    According to this post (What is a pre-revprop-change hook in SVN, and how do I create it?), I understand you have to create a pre-revprop-change.bat file to do this.

    My question is if I just add this bat file, make the changes to the log messages, and then remove the bat file, will the settings go back to the previous state (ex. log messages uneditable).. or do I have run the bat file myself and then come up with another script to undo the changes?

    Thanks!