Home > redmine, subversion > Subversion: modify the comment of a commit

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.

Categories: redmine, subversion Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: