Posts Tagged ‘commit’

Subversion: modify the comment of a commit

October 5, 2012 Leave a comment

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: , , ,

Subversion: is already under version control

I’ve deleted a directory from my repository, and then I created one with the same name. When I issue a commit to subversion from eclipse, I get this error:

'<dir>' is already under version control

It means that an invisible .svn folder already exists with the “old” svn data.
To solve it, just removed the .svn folder and it will work again.

Categories: eclipse, subversion Tags: ,