What are RCS Keywords?
Asked Answered
C

2

5

I keep seeing RCS and RCS Keywords while looking at svn and cvs. I don't know what RCS is and what the RCS Keywords are. They seem to be a feature but with no real explanation as to what they do.

Campinas answered 10/3, 2011 at 9:44 Comment(0)
D
8

This feature is a way to replace certains tokens in a file with meta information like user, date, revision number and similar. These keywords came from RCS (Revision Control System), a single-user file based version control system, which presumably nowadays nobody uses anymore.

Subversion (svn) and Concurrent Versioning System (CVS) are centralized version control systems, not distributed ones (DVCS).

  • CVS supports about the same keywords as RCS (since CVS was originally based on RCS and uses the same backend file format), and automatically replaces them if the file is not specially marked at checkin.

  • Subversion (the self-declared CVS-successor) has a similar set of keywords which can be replaced, but does not replace them automatically, only if you set some file property saying which keywords you want to be replaced. (For some keywords the syntax is a bit different than the one of the corresponding CVS keywords.)

The famous distributed VCS-es are Git, Mercurial, Bazaar - I know only Git, the information about Bazaar and Mercurial are googled. In general, as these usually use a hash of the current tree as a version identifier, they can't insert this identifier on commit, but do this on checkout, if at all, and only when configured to do so.

Danish answered 10/3, 2011 at 10:42 Comment(3)
For clarity the feature is a way to replace a certain token in a file automatically with up to date data, based on key words.Campinas
Yeah, sorry. I assumed people would first read the answer by khmarbaise, thus I did not repeat this.Normie
It was not single user, but it was file-system based.Keffer
C
5

The Revision Control System is a version control system which is based on files and not on projects etc. The Keywords are used to replace the contents of the Keywords with information of the Revision Control system for example in your source code the revision. Take a look into the docs of RCS. See for Identifiers (examples are excerpt from the manual).

   $Id$

will be replaced by:

  $Id: filename revision number date time author state locker $

Here you can find the CVS Documentation.

Chimkent answered 10/3, 2011 at 10:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.