Subversion(SVN)自動展開關鍵字的方法
通用設置
在subversion的config文件中添加/修改如下一段:
[miscellany]
enable-auto-props = yes
[auto-props]
* = svn:keywords=LastChangedDate LastChangedRevision LastChangedBy Id Author Date Revision HeadURL;svn:eol-style=native
路徑
Windows: %APPDATA%\Subversion\config %ALLUSERSPROFILE%\Application Data\Subversion\config
Unix/Linux: ~/var/lib/subversion/conf/ ~/.subversion/config /etc/subversion/config
支持軟件
This is also the place to look for the config file if you are using Windows, Eclipse and the Subclipse Plugin and using the JavaHL binding (probably also for the JavaSVN binding, but I did not test that).
補充說明
如果已經(jīng)存在的文件(如果之前沒有開啟關鍵字替換),那么再次更新也不會替換。也就是說僅僅對新添加的文件(開啟此特性之后)的文件才有效。對于已經(jīng)存在的文件,需要使用下面命令來生效。當然也可以使用subclipse的圖形界面來操作。
svn propset svn:keywords "Id" <file>
原文說明
### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes
參考地址
©2009-2014 IMXYLZ
|求賢若渴