问题描述
我有兴趣在帮助页面中显示我的代码的版本号。理想情况下,我会使用Major.Minor.SVNrevision格式,SVNrevision号码被自动拉出。我希望?怀疑有一个变量,我可以访问某处,但不知道可能是什么。
I'm interested in displaying the version number of my code in a help page. Ideally I'd use a Major.Minor.SVNrevision format, where the SVNrevision number was pulled automatically. I hope? Suspect there's a variable I can access somewhere, but have no idea what it may be.
任何提示?
推荐答案
您可以通过在工作文件中添加所谓的SVN关键字来实现。 。然后,您有两个选项:
You can do this by adding so-called SVN Keywords into your working files. This chapter contains standard SVN keywords. Then you have two options:
-
为每个文件夹设置属性 svn:keywords 以进行此替换可用于所有使用此存储库的人: svn propset svn:keywords日期作者修订版help.html
set property for each folder svn:keywords to make this substitution available for all who works with this repository: svn propset svn:keywords "Date Author Revision" help.html
修改svn配置文件(在Windows上:%USERPROFILE%\Application Data\Subversion\config ,在Linux上:〜/ .subversion / config )启用所有存储库的自动属性和您正在使用的文件(根据模式):将 enable-auto-props 设置为是,然后添加到[auto-props]部分: * .html = svn:keywords =日期作者修订
modify svn configuration file (on Windows: %USERPROFILE%\Application Data\Subversion\config, on Linux: ~/.subversion/config) to enable automatic properties for all repositories and files (according to pattern) you're working with: set enable-auto-props to yes and then add to [auto-props] section: *.html = svn:keywords=Date Author Revision
这篇关于我怎么能在我的代码中有eclipse自动插入subversion修订号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!