views:

709

answers:

2

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 (http://stackoverflow.com/questions/197224/what-is-a-pre-revprop-change-hook-in-svn-and-how-do-i-create-it/197240), 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!

+1  A: 

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.

Daniel Vandersluis
Thank you very much
A: 

very nice and simple solution. Thank you, Daniel!

Zhao Wang