表 6.3. 可用关键字列表
|$WCREV&$||用工作副本中的最高提交修订版本号替换，ANDed with the value after the & char. 例如：|
|$WCREV-$, $WCREV+$||Replaced with the highest commit revision in the working copy, with the value after the + or - char added or subtracted. For example: |
|$WCDATE$, $WCDATEUTC$||Replaced with the commit date/time of the highest commit revision. By default, international format is used: |
|$WCNOW$, $WCNOWUTC$||Replaced with the current system date/time. This can be used to indicate the build time. Time formatting can be used as described for |
|$WCRANGE$||Replaced with the update revision range in the working copy. If the working copy is in a consistent state, this will be a single revision. If the working copy contains mixed revisions, either due to being out of date, or due to a deliberate update-to-revision, then the range will be shown in the form 100:200.|
|$WCLOCKDATE$, $WCLOCKDATEUTC$||Replaced with the lock date. Time formatting can be used as described for |
SubWCRev does not directly support nesting of expressions, so for example you cannot use an expression like:
#define SVN_REVISION "$WCMIXED?$WCRANGE$:$WCREV$$"
But you can usually work around it by other means, for example:
#define SVN_RANGE $WCRANGE$ #define SVN_REV $WCREV$ #define SVN_REVISION "$WCMIXED?SVN_RANGE:SVN_REV$"
Some of these keywords apply to single files rather than to an entire working copy, so it only makes sense to use these when SubWCRev is called to scan a single file. This applies to