Subversion: modify the comment of a commit
When I forget to comment a subversion commit, or if I want to change it, there is no easy way to edit or modify the commit.
But in the documentation you can find two ways to change it:
I use the second one, using svnadmin and the –bypass-hooks option:
$ svnadmin setlog REPOS_PATH -r N FILE
where REPOS_PATH is the path to the repository location, N is the revision number whose log message you wish to change, and FILE is a file containing the new log message.
For instance, to add a comment to a previous revision (13), I type this command:
$ echo "My new comment for this commit (#124)" > log.txt $ svnadmin setlog ~/svn/myproject/ -r 13 log.txt --bypass-hooks
The (#124) is because I use redmine as project manager. Once added the new comment. I cannot see it at redmine. But that’s easy. Simply delete the repository and add it again to redmine, and you’ll see the content updated.