Search code examples
svncvsrcs

What are RCS Keywords?


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.


Solution

  • 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.