VSS、CVS、Firefly中的扩展关键字


1 概述

    源代码管理控制系统中一般都提供了关键字扩展功能,这里从它们的手册中摘录了支持的关键字列表,供参考。

2 VSS

$Archive: $

VSS archive file location

$Author: $

User who last changed the file

$Date: $

Date and time of last checkin

$Header: $

Logfile, Revision, Date, Author

$History: $

File history, VSS format

$JustDate: $

Date, without the time addendum.

$Log: $ 

File history, RCS format

$Logfile: $

Same as Archive

$Modtime: $

Date and time of last modification

$Revision: $

VSS version number

$Workfile: $

File name

$NoKeywords: $

No keyword expansion for all keywords that follow

3 CVS

$Author: $

The login name of the user who checked in the revision.

$Date: $

The date and time (UTC) the revision was checked in.

$Header: $

A standard header containing the full pathname of the RCS file, the revision number, the date (UTC), the author, the state, and the locker (if locked). Files will normally never be locked when you use CVS.

$Id$

Same as $Header$, except that the RCS filename is without a path.

$Name$

Tag name used to check out this file.

$Locker$

The login name of the user who locked the revision (empty if not locked, and thus almost always useless when you are using CVS).

$Log$

The log message supplied during commit, preceded by a header containing the RCS filename, the revision number, the author, and the date (UTC). Existing log messages are not replaced. Instead, the new log message is inserted after $Log:...$. Each new line is prefixed with the same string which precedes the $Log keyword. For example, if the file contains

/* Here is what people have been up to:
 *
 * $Log: frob.c,v $
 * Revision 1.1 1997/01/03 14:23:51 joe
 * Add the superfrobnicate option
 *
 */

then additional lines which are added when expanding the $Log keyword will be preceded by ` * '. Unlike previous versions of CVS and RCS, the comment leader from the RCS file is not used. The $Log keyword is useful for accumulating a complete change log in a source file, but for several reasons it can be problematic. See section Problems with the $Log$ keyword.

$RCSfile$

The name of the RCS file without a path.

$Revision$

The revision number assigned to the revision.

$Source$

The full pathname of the RCS file.

$State$

The state assigned to the revision. States can be assigned with cvs admin -s---see section admin options.

4 Firefly

    Firefly的关键字和SCCS的关键字基本兼容。关键字的具体含义和用法如下表所示:

版本号

%I%

版本号

例如:版本号为1.72,“1”是版本号中的发布号,Firefly的发布号永远是1。“72 是版本号中的级别号,实际上是指该文件到根版本的距离、或深度。在SCCSSID是包括R.L.B.S. ‘R'‘L'‘B'‘S'分别是指‘release'‘level'‘branch'‘sequence'

FireflyBranch Sequence是被忽略的。

%R%

版本号中的发布号

%L%

版本号中的级别号

%B%

版本号中的分支号(Firefly中忽略)

%S%

版本号中的序列号(Firefly中忽略)

文件名

%M%

文件名。例如:String.java

%P%, %F%

文件在workspace中的绝对路径例如:java/lang/String.java

时间和日期

%T%

HH:mm:ss格式表示当前时间例如:11:23:45

%U%

HH:mm:ss格式表示最新的delta被建立的时间例如:11:23:45

%D%

yyyy/mm/dd格式表示当前的日期例如:2000/07/19

%E%

yyyy/mm/dd格式表示最新的delta被建立的日期例如:2000/07/19

%H%

mm/dd/yyyy格式表示当前的日期例如:07/19/2000

%G%

mm/dd/yyyy格式表示最新的delta被建立的日期例如:07/19/2000

其它

%Z%

Unix下使用的命令,表示一个字符串@(#)。用于Unix中的what目录。

%Y%

二进制文件或文本文件。text|binary

%A%

%Z%%Y%%M%%I%%Z%的组合

例如: @(#)text fly.html 1.42@(#)

%W%

%Z%%M%%I%的组合

例如: @(#)fly.html 1.42

参考文献:

1、Microsoft Visual Source Safe 联机文档
2、CVS 联机文档
3、Hansky Firefly 联机文档


Copyright 2000-2005,zedware_at_gmail_dot_com
Last modified on Friday, 2004-09-10