What are RCS keywords?

I look at RCS and RCS Keywords, looking at svn and cvs. I do not know what RCS is and what are the keywords RCS. They seem to be a feature, but do not have a real explanation of what they are doing.

+4
source share
2 answers

This function allows you to replace certificate tokens in the file with meta-information such as user, date, version number, etc. These keywords are taken from RCS (Revision Control System), a single-user version control file system that appears to be no longer in use.

Subversion (svn) and parallel version control system (CVS) are centralized version control systems , not distributed (DVCS).

  • CVS supports 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 during registration.

  • Subversion (a self-proclaimed CVS successor) has a similar set of keywords that can be replaced , but not automatically replaced, only if you set some file property that indicates which keywords you want to replace. (For some keywords, the syntax is slightly different from one of the corresponding CVS keywords.)

The famous distributed VCS -es are Git, Mercurial, Bazaar - I only know Git, information about Bazaar and Mercurial is googled. In general, since they usually use the hash of the current tree as the version identifier, they cannot insert this identifier in commit, but do this when checking, if at all, and only when setting up for this.

+6
source

A version control system is a version control system that is based on files, not on projects, etc. Keywords are used to replace the contents of keywords with version control system information, for example, in your source code. Take a look at the RCS docs . See the Identifiers section (examples taken from the manual).

$Id$ 

will be replaced by:

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

Here you can find the CVS Documentation .

+4
source

Source: https://habr.com/ru/post/1343144/


All Articles