有没有办法使用 Subclipse for Eclipse 在文件中指定 $GlobalRev$
我知道如何使用 Eclipse 将本地版本号放入文件中。右键单击 Team,设置属性,然后设置 svn:keywords Id。
但是如何让 $GlobalRev$ 出现呢?有一个叫做 svnversion 的东西应该可以做到这一点,但是它是否集成到 Subclipse 中?
I know how to get the local version number into a file with Eclipse. Right click, Team, set property then svn:keywords Id.
But how do you get the $GlobalRev$ to appear? There's something called svnversion which is supposed to do this but is it integrated into Subclipse?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Subversion 不支持 $GlobalRev$ 关键字的概念。有一个名为 svnversion 的命令行工具,可以将修订版本输出到 stdout。您可以将其与脚本结合起来将其写入文件。一直有人问这个问题,所以有一个常见问题解答:
http: //subversion.tigris.org/faq.html#version-value-in-source
如果您使用的是 Windows,还有一个名为 SubWCRev.exe 的命令行程序可用,它与 svnversion 类似,但会进行替换在为您准备的文件中。请注意,您不能在版本化文件上使用它,您需要将其与某种模板文件结合起来。请参阅:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn- subwcrev.html
其中任何一个都可以通过为其设置外部工具命令从 Eclipse 运行。
Subversion does not support the concept of a $GlobalRev$ keyword. There is a command line tool called svnversion that will output revisions to stdout. You can combine that with a script to write this to a file. This is asked about all the time, so there is a FAQ:
http://subversion.tigris.org/faq.html#version-value-in-source
If you are on Windows, there is also a command line program available called SubWCRev.exe that is similar to svnversion but will do substitution in a file for you. Note that you cannot use this on a versioned file, you need the combine it with a template file of some kind. See:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html
Either of these could be run from Eclipse by setting up an External Tool command for it.