关键字替换

Posted on Posted in 7.subwcrev程序

关键字替换

如果提供了源文件和目的文件,SubWCRev 会复制源文件到目标文件,执行如下所属的关键字替换:

表 6.2. 列出可用的命令行开关

关键字 描述
$WCREV$ 用工作副本中最高的提交版本来替换
$WCDATE$ 用最高提交版本的日期/时间替换。默认使用国际化格式:yyyy-mm-dd hh:mm:ss。作为选择,你可以指定 strftime() 使用自定义格式,例如:$WCDATE=%a %b %d %I:%M:%S %p$。格式字符的列表参见 在线引用
$WCNOW$ Replaced with the current system date/time. This can be used to indicate the build time. Time formatting is as described above.
$WCRANGE$ 在工作目录用更新版本范围替换。如果工作目录处于一致的状态,它是一个单一版本。如果工作目录包含混合版本,或者是过时,或者是故意更新到版本,那么这个范围会用象100:200这样的格式来显示。
$WCMIXED$ 当有混合版本时用 TText 替换 $WCMIXED?TText:FText$,否则用 FText 替换。
$WCMODS$ 若本地存在修改,就用 TText 替换 $WCMODS?TText:FText$,否则用 FText 替换。
$WCURL$ 用传递给SubWCRev的工作目录的版本库地址替换。
$WCNOW$ Replaced with the current time and date
$WCNOW= Replaced with the current time and date in standard format
$WCINSVN$ $WCINSVN?TText:FText$ is replaced with TText if the entry is versioned, or FText if not.
$WCNEEDSLOCK$ $WCNEEDSLOCK?TText:FText$ is replaced with TText if the entry has the svn:needs-lock property set, or FText if not.
$WCISLOCKED$ $WCISLOCKED?TText:FText$ is replaced with TText if the entry is locked, or FText if not.
$WCLOCKDATE$ Replaced with the lock date
$WCLOCKOWNER$ Replaced with the name of the lock owner
$WCLOCKCOMMENT$ Replaced with the comment of the lock