Generally, when writing code, we will write some help information in the Code header, such as the following file date, version number, author, etc.
/**
* $ Date: 2005/07/18 08:49:35 $
*
* @ Author cap
* @ Version $ revision: 1.7 $
*/
If you are using CVS to maintain your code, you can use the keyword replacement function of CVS to help maintain this information, because they are dynamically updated, so it is very convenient to maintain, for example, $ revision $ indicates the version number on CVs. In fact, this version number can also be used as the version number of our file. All we need to do is to write the following keyword mark.
/**
* $ Date $
* @ Version $ revision $
*/
After CVS is submitted, the file is automatically updated
/**
* $ Date: 08:49:35 $
* @ Version $ revision: 1.7 $
*/
It is very convenient. These keywords can be placed in the comments of Java code. At the same time, you should avoid such variables in Java code. Otherwise, they will be replaced, resulting in unexpected results. Below is a list of these keywords.
$ Author $ User Name
$ Data $ registration time
$ Header $ Standard Header, including the full path name, date, and author of the RCS
$ ID $ except for incomplete names of the RFM file, it is the same as $ header $.
$ Log $ contains the full path name, version number, date, author, and log information provided at the time of submission of the RCS.
$ Rcsfile $ name of the file that contains the RCs, excluding the path name
$ Revision $ assigned version number
$ Source $ full name of the RCS File
$ State $ status of the allocated version, which is allocated by CVS admin-s.
These are all useful keywords. Of course there are more. You can view them here. If you want to disable the keyword replacement function, refer to here