如何自动将 SVN 提交消息和修订编号添加到 java 文件?
我正在 Eclipse 中使用 Maven2 开发 Apache Wicket 项目——我的 SCM 是 Subversion。我已经设置了 Subclipse,用它来提交对存储库的更改。
我见过几个项目,它们的标题很好,其中包含当前修订号,并且在 java 源文件的底部有一个已提交到文件的所有更改的列表,包括已传递的注释。
有什么方法可以自动实现这种行为吗?在工作中,我使用 MKS 自动执行此操作,但我尚未弄清楚如何使用 SVN 和 Eclipse 来实现此目的。
I'm working on an Apache Wicket project in Eclipse with Maven2 -- my SCM is Subversion. I've got Subclipse set up which I use to commit changes to the repository.
I've seen several projects with nice headers containing the current revision number and at the bottom of the java source file there's a list of all the changes that have been committed to the file including the comments that were passed.
Is there any way of achieving this sort of behaviour automatically? At work I'm using MKS which does this automatically but I am yet to figure out how to achieve this with SVN and Eclipse.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你问的是“关键字替换”,确实是可能的。此页面将解释您需要了解的所有内容:
http://svnbook.red-bean.com /en/1.5/svn.advanced.props.special.keywords.html
仅供参考,并不是每个人都认为这是一个好主意。例如:
http://wordaligned.org/articles/keyword-substitution-just-say-no
You are asking about "Keyword Substitution", and it is indeed possible. This page will explain everything you need to know:
http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html
FYI not everybody thinks this is a good idea. E.g.:
http://wordaligned.org/articles/keyword-substitution-just-say-no
您可以使用预定义的密钥在 SVN 中提交更改。您可以在 Preferences | Eclipse 中查看所有预定义的键。一般|钥匙。
请参阅: https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Faccessibility%2Fkeyboardshortcuts.htm
You can use predefined keys to commit the changes in SVN. You can check Eclipse all the predefined keys in Preferences | General | Keys.
Refer: https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Faccessibility%2Fkeyboardshortcuts.htm