Edit a log message that I already committed in Subversion on Linux :
You can use svn proedit command to edit the logs, But sometimes it will give an error like this : "svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found"So the solution is Set SVN_EDITOR Environment Variable To Vim.
Here the command to export the path :# export SVN_EDITOR=vimTo permanently set this environment variable put the below line in your ~/.bash_profile file.# export SVN_EDITOR=vimNow you can edit the SVN log :# svn propedit -r N --revprop svn:log URL OR# svn propset -r N --revprop svn:log "new log message" URLHere N will be the Rev noURL is your SVN pathWhen you run this propedit command, and just in case you see this message"DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existen"Its because Subversion doesn't allow you to modify log messages because they are unversioned and will be lost permanently.Go to the hooks directory on your Subversion server (replace ~/svn/reponame with the directory of your repository)# cd ~/svn/reponame/hooksRemove the extension
# mv pre-revprop-change.tmpl pre-revprop-changeMake it executable (cannot do chmod +x!)#chmod 755 pre-revprop-change
Now edit, it will work..!**************
You can use svn proedit command to edit the logs, But sometimes it will give an error like this :
"svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found"
So the solution is Set SVN_EDITOR Environment Variable To Vim.
Here the command to export the path :
Here the command to export the path :
# export SVN_EDITOR=vim
To permanently set this environment variable put the below line in your ~/.bash_profile file.
# export SVN_EDITOR=vim
Now you can edit the SVN log :
# svn propedit -r N --revprop svn:log URL
OR
# svn propset -r N --revprop svn:log "new log message" URL
Here N will be the Rev no
URL is your SVN path
When you run this propedit command, and just in case you see this message
"DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existen"
Its because Subversion doesn't allow you to modify log messages because they are unversioned and will be lost permanently.
Go to the hooks directory on your Subversion server (replace ~/svn/reponame with the directory of your repository)
# cd ~/svn/reponame/hooks
Remove the extension
# mv pre-revprop-change.tmpl pre-revprop-change
# mv pre-revprop-change.tmpl pre-revprop-change
Make it executable (cannot do chmod +x!)
#chmod 755 pre-revprop-change
Now edit, it will work..!
**************
No comments:
Post a Comment