Defining RCS Keywords
Top  Previous  Next


RCS keywords are special patterns inserted into text files which are managed by CS-RCS. RCS keywords are used to incorporate RCS status information into source files.

For example, the command:
const char *id = "$Id: $"
is expanded to:
const char *id = "$Id: key.txt,v 1.2 1997/06/02 12:13:44 Jacob Exp Jane $"

Notes:
·It is recommended to set the Keyword Expand feature on the project Advanced Properties to False. This will allow CS-RCS to expand RCS keywords during Retrieve revision command only. As RCS keywords are normally ignored during normal development, this feature may improve performance on RCS commands and product builds. However, if you want to use RCS keywords on normal development, please make sure this option is set to True.  

·Since keyword expansion can slow down check-in and check-out operations and cause unnecessary compilations, it is recommended to use keywords only on specific files.  

·RCS keywords are not applicable for binary files such as MS-Office documents. However, CS-RCS does support update of MS-Word, MS-Excel and OpenOffice Writer tags that can be expanded in the document header, footer and body. For full details, refer to Working with Microsoft Word Documents or Working with Open Office Documents in Integration with Windows Tools.  

The following list describes commonly used RCS keywords:

$Header: $ – A standard header containing the full pathname of the RCS file, revision number, date and time, author, state, and login name of the user who locked the revision (if locked).

$Id: $ – A standard header containing the RCS file name, revision number, date and time, author, state, and the login name of the user who checked-in the revision (if locked).

$Log: $ – Complete history of the file including the log message supplied during check-in. Note: Files containing the keyword $Log, will have all keywords expanded regardless to the state of the "Keyword expansion" property in the Projects Advanced tab.

$Author: $ – The login name of the user who checked-in the revision.

$Date: $ – The date and time the revision was checked-in.

$Locker: $ – The login name of the user who locked the revision (empty if not locked).

$Revision: $ – The revision number assigned to the revision.

$Name: $ – The symbolic name used to check-out the revision, if any.

$RCSfile: $ – The name of the RCS file without a path.

$Source: $ – The full pathname of the RCS file.