0

Is there any means to modify a Subversion log entry, after COMMIT, and without resorting to server-side work?

Roberto Reale
  • 4,247
  • 1
  • 17
  • 21

2 Answers2

2

This is only possible if the repository administrator has enabled revision property editing via the pre-revprop-change hook script. By default, this action is denied.

See also:

Community
  • 1
  • 1
alroc
  • 27,574
  • 6
  • 51
  • 97
1

Yes. There are two types of properties In Subversion. One is a file property. This is part of a file or directory and is versioned with the file. Another property is the revison property. This property is placed on the revision change itself and is not versioned.

Three special revision properties are set at the time of commit. One is svn:log which is the commit message. Another is svn:author which is the id do the user who did the commit, and the last is the svn:date Which is when the commit was made.

Since these properties are not versioned, changing the value could be disastrous. You could hide the author of a change, change the date, or why the change was made. Therefore, Subversion does not allow anyone to change these properties without permission.

You grant permission via a pre-revprop-change hook. And you can use this hook to limit who can make a change. In many hooks:

  • Only the svn:log property can be changed.
  • Only the author of the commit or the SVN Admin is allowed to change the svn:log property.

A template pre-revprop-change template hook is created in the hooks directory of the repository that does these two items. Many sites simply use that template script. However, I've seen sites do other things.

  • Limit the amount of time you're allowed to change the commit message. Maybe allow someone an hour window to change it.
  • Keep a log of the changes.
  • Make sure changes in the svn:log revprop match the chess age in a system like Jenkins.

Once you have the pre-revprop-change hook activated, you can change the message with the following command:

$ svn propedit --revprop -r $REV "new commit message"
David W.
  • 105,218
  • 39
  • 216
  • 337