Can I go back and edit SVN validation comments?

I made a mistake in commenting on SVN. Can I change this after registering?

+58
svn tortoisesvn
Mar 28 '09 at 14:42
source share
7 answers

Fixed messages are "unbelievable properties" and can be changed using svn propset , for example

$ svn propset --revprop -r 25 svn:log "Journaled about trip to New York." property 'svn:log' set on repository revision '25' 

This sets the revision property called "svn: log" in revision 25

Configuring subversion to change change properties

Since they are not converted, setting subversion by default will not allow you to change these properties unless you provide a pre-revprop-change hook script.

Here's a typical script, from / var / lib / svn / hooks / pre -revprop-change on my system:

 #!/bin/sh REPOS="$1" REV="$2" USER="$3" PROPNAME="$4" ACTION="$5" if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then echo "$1 $2 $3 $4 $5" >> /var/lib/svn/logchanges.log exit 0; fi echo "Changing revision properties other than svn:log is prohibited" >&2 exit 1 

This log changes the properties of svn: log and allows editing with exit 0, any other change to the version property is rejected with output 1. See patmortech answer for the Windows equivalent.

+64
Mar 28 '09 at 14:52
source share

To enable revision property modification, you need to create a pre-revprop-change script binding. Here you can read: http://svnbook.red-bean.com/en/1.0/ch05s02.html (find the "Hook Scripts" section).

For Windows, here is a link to an example batch file that only allows changes to the log message (and not other properties): http://ayria.livejournal.com/33438.html , basically copy the code below into a text file and name it pre -revprop-change.bat and save it in the / hooks subdirectory for your repository.

 @ECHO OFF :: Set all parameters. Even though most are not used, in case you want to add :: changes that allow, for example, editing of the author or addition of log messages. set repository=%1 set revision=%2 set userName=%3 set propertyName=%4 set action=%5 :: Only allow the log message to be changed, but not author, etc. if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME :: Only allow modification of a log message, not addition or deletion. if /I not "%action%" == "M" goto ERROR_ACTION :: Make sure that the new svn:log message is not empty. set bIsEmpty=true for /f "tokens=*" %%g in ('find /V ""') do ( set bIsEmpty=false ) if "%bIsEmpty%" == "true" goto ERROR_EMPTY goto :eof :ERROR_EMPTY echo Empty svn:log messages are not allowed. >&2 goto ERROR_EXIT :ERROR_PROPNAME echo Only changes to svn:log messages are allowed. >&2 goto ERROR_EXIT :ERROR_ACTION echo Only modifications to svn:log revision properties are allowed. >&2 goto ERROR_EXIT :ERROR_EXIT exit /b 1 
+57
Mar 28 '09 at 16:17
source share

A way to quickly change a log message without having to create a pre-revprop-change script binding is to use the following svnadmin command :

 svnadmin setlog --bypass-hooks REPOS_PATH -r N FILE 

where REPOS_PATH is the path to the repository on the server (for example, / srv / svn / repository), N is the version number (for example, 25), and FILE is the text file containing the correct commit log entry.

Two things: This requires the file system access to the repository files, but it also creates a pre-revprop-change script binding ... and secondly, this command will bypass any hook scripts that may be in place, therefore it is recommended to use it. ..

+23
Apr 19 '09 at 0:57
source share

Using Tortoise SVN will make this very easy for you. Just launch the log message window, right-click the change log that you want to edit, and select "Edit log" in the context menu.

+9
Mar 30 '09 at 16:12
source share

In Tortoise SVN, you can follow these steps.
1. Go to the repository browser.
2. Right-click the folder in which you want to work.
3. Click Show Log.
4. In the list of changes, select and right-click the desired revision.
5. Click "Edit Journal Message."

Now you can edit your comments in the svn check version.

Thank!

+6
Jan 16 '15 at 2:22
source share
 svn propset svn:log --revprop -r <REVISION> "My corrected log message" <PATH-TO-REPOSITORY> 
+4
Mar 28 '09 at 14:46
source share

In Eclipse (or Rational Application Developer) using Subclipse:

select command β†’ Show history, then right-click on the version whose comments you want to change, then select β€œSet command properties” and you can change the comment and / or author.

+4
Feb 16 '10 at 17:13
source share



All Articles