xylz,imxylz

关注后端架构、中间件、分布式和并发编程

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  111 随笔 :: 10 文章 :: 2680 评论 :: 0 Trackbacks

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).

补充说明

如果已经存在的文件(如果之前没有开启关键字替换),那么再次更新也不会替换。也就是说仅仅对新添加的文件(开启此特性之后)的文件才有效。对于已经存在的文件,需要使用下面命令来生效。当然也可以使用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 |求贤若渴
posted on 2011-04-12 14:02 imxylz 阅读(3333) 评论(0)  编辑  收藏 所属分类: 技术

只有注册用户登录后才能发表评论。


网站导航:
 

©2009-2014 IMXYLZ