[英]To add a file with a revision number on commit in SVN
I've not sure if this could be implemented with Subversion, but is there a way to add a file with the revision number on commit? 我不确定是否可以使用Subversion来实现,但是有没有一种方法可以在提交时添加带有修订号的文件?
UPDATE: 更新:
OK, I've added this option to my SVN configuration 好的,我已经将此选项添加到了SVN配置中
[auto-props]
enable-auto-props = yes
*.php = svn:keywords=Id
Here is the file I'm checking in with SVN (command line) 这是我正在用SVN(命令行)签入的文件
<?php
/**
* $Id$
*/
?>
$Id$
Looking in the repository I only see the code above and not the revision number. 在存储库中,我只会看到上面的代码,而看不到修订号。
Perhaps this would help: 也许这会有所帮助:
http://www.startupcto.com/server-tech/subversion/setting-the-id-tag http://www.startupcto.com/server-tech/subversion/setting-the-id-tag
Preface 前言
If you want to have global revision number for repository, you get wrong solution and implement even this bad solution in not optimal way 如果您想要存储库的全局修订版号,则会得到错误的解决方案 ,甚至会以非最佳方式实施此不良解决方案
Face 面对
$svn info . ... Revision: 9012 Node Kind: directory ... Last Changed Rev: 5381 ...
or 要么
$svnversion
$ svnversion,如果
9012
9012
svn propset
for this and only this file svn propset
svn.exe export ... z:\\trunk$WCDATE=%Y%m%d$-r$WCREV$
pattern command to export into unique dir-name and the same WCDATE template in text-file replaced with human-readable and informative data, $WCDATE=%Y%m%d$-r$WCREV$
was 20120122-r1143 at latest commit svn.exe export ... z:\\trunk$WCDATE=%Y%m%d$-r$WCREV$
获取svn.exe export ... z:\\trunk$WCDATE=%Y%m%d$-r$WCREV$
pattern命令导出到唯一的目录名,并且替换了文本文件中的相同WCDATE模板使用人类可读且信息丰富的数据, $WCDATE=%Y%m%d$-r$WCREV$
在最近一次提交时为20120122-r1143
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.