Include the file version information in the text file controlled by CVS

Source: Internet
Author: User

After using Mantis, I decided to use CVS to control Mantis modifications. When I checked out the PHP code, I found this information:

......
#-------------------------------------------------
# $ Revision: 1.2 $
# $ Author: CVSUser $
# $ Date: 2004/03/14 15:17:18 $
#
# $ Id: strings_chinese_simplified.txt, v 1.2 2004/03/14 15:17:18 CVSUser Exp $
......

After each modification is submitted, it will automatically change. Some instructions are found on the Internet. The following content is taken from ChinaUnix.

CVS replaces the file with a keyword (macro) by default. Adding these keywords to the file is a good work habit.
$ Id $ keyword is replaced by the file name, version, time, author, and code nature. If you use the-l option to retrieve the keyword, the name of the logon user will be added after Exp. In addition to the $ Id $ keyword, the following common keywords are also supported:

$ Log $: the modified Log information you provided.
$ Author $: Author of the version.
$ Locker $: Locker of this version
$ State $: the Status Exp (trial version), Stabe (stable version), and Rel (release version) of this version. The default value is Exp.
$ Date $: the time when the version is saved, in UTC time format.
$ Revision $: Version Number of this version
$ RCSfile $: RFM file name
$ Source $: full path name of the RCS
$ Name $: retrieve the symbolic Name of this version.
$ Header $: equivalent to $ Source $ Revision $ Date $ Author $ State $ Locker $ combination

Conclusion: CVS inserts the result before the last $ symbol of the macro when performing macro replacement. For example, $ Revision: $ is replaced with $ Revision: 1.5 $.

In some cases, it should be a good function, but it cannot be abused. Otherwise, it may affect document generation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.