I put a mistake into a comment in SVN. Can I edit this after checkin?
相关问题
- How can I set the SVN password with Emacs 23.1 bui
- If statements in .htaccess files, to enable passwo
- SVN+SSH checkout over VPN using tortoise SVN, Smar
- Mercurial compared to private branches in SVN
- Using Subversion and SourceSafe at the same time?
相关文章
- Is there a version control system abstraction for
- Intermittent “SVNException: svn: E175002: Connecti
- IntelliJ Subversion Authentication Required Dialog
- TortoiseHG and hgsubversion (Windows): “no module
- Incompatible JavaHl library loaded
- TFS vs. JIRA/Bamboo/SVN [closed]
- converting svn repo to git using reposurgeon
- SVN查看日志超时
Using Tortoise SVN will make this very very easy for you. Simply bring up the log messages window, right click the revision log you would like to edit, and choose Edit Log from the context menu.
A way to do a quick change to the log message without having to create a pre-revprop-change hook script is to use the following
svnadmin
command:where
REPOS_PATH
is the path to the repository on the server (e.g. /srv/svn/repository) andN
is the revision number (e.g. 25) and FILE is a text file containing the correct commit log entry.Two things: This requires filesystem access to the repository files, but so does creating a pre-revprop-change hook script... and secondly, this command will bypass any hook scripts that may be in place, so use advisedly...
To enable the revision property modification, you need to create a pre-revprop-change hook script. Can read about it here: http://svnbook.red-bean.com/en/1.0/ch05s02.html (look for Hook Scripts section).
For Windows, here's a link to an example batch file that only allows changes to the log message (not other properties): http://ayria.livejournal.com/33438.html. Basically copy the code below into a text file and name it pre-revprop-change.bat and save it in the /hooks subdirectory for your repository.
Commit messages are "unversioned properties" and can be changed with the svn propset command, for example
This is setting the revision property called "svn:log" on revision 25
Configuring subversion to allow revision property changes
Because these are unversioned, a default installation of subversion won't let you modify these properties unless you provide a pre-revprop-change hook script.
Here's a typical script, from /var/lib/svn/hooks/pre-revprop-change on my system:
This logs changes to svn:log revision properties, and allows the edit by using exit 0, any other revision property change is denied by using exit 1. See patmortech's answer for a Windows equivalent.
In Eclipse (or Rational Application Developer) using Subclipse:
choose Team --> Show History then Right-click the revision whose comments you wish to change, then choose "Set Commit Properties" and you can change the comment and/or author.
In Tortoise SVN, you can follow the steps below.
1. Go to Repository Browser.
2. Right Click on the folder that you want to work on.
3. Click Show Log.
4. In the revision listing, select and right click on the revision that you want.
5. Click Edit log message.
You can now edit your comments in the svn checkin revision.
Thanks!