CVS Best Practices

This is spun off from Starter Tcl.

The original material

escargo 26 Nov 2002 - I'm not sure if it fits in above or not, but configuration control using CVS [L1 ], should be considered. First, TkCVS [L2 ] interfaces to it. Second, there is the issue of putting appropriate tags in tcl source files. Some samples of the code that reside on this Wiki use CVS tags in creative ways (look at that package provide statement in Menus Even Easier Redux and the set RCSID in Text variable for text widget).

Is there a set of best practices for using CVS with Tcl that gets the best use out of CVS?

LV I'm not even certain I've seen a document concerning how the TCT is using CVS with the core. However, escargo, I recommend you spin this page off into a page to collect such tidbits.


So, the first issue of interest to me at least is what keywords do people use in their code and what do they use them for.

The defined CVS keywords that I know of:

  • $Author$ - The login name of the user who checked in the revision.
  • $Date$ - The date and time the revision was checked in.
  • $Header$ - A standard header containing the full pathname of the RCS file, the revision number, the date and time, the author, the state, and the locker (if locked).
  • $Id$ - Same as $Header$, except that the RCS filename is without a path.
  • $Locker$ - The login name of the user who locked the revision (empty if not locked).
  • $Log$ - The log message supplied during checkin. For ident's purposes, this is equivalent to $RCSfile$.
  • $Name$ - The symbolic name used to check out the revision, if any.
  • $RCSfile$ - The name of the RCS file without a path.
  • $Revision$ - The revision number assigned to the revision.
  • $Source$ - The full pathname of the RCS file.
  • $State$ - The state assigned to the revision with the -s option of rcs(1) or ci(1).

MGS [2010-05-16]: Added the full list of keywords, and their descriptions, from 'man ident'.

Thinking about the choices, it looks to me like the package provide statement in Menus Even Easier Redux could have been simplified if it used the Revision keyword instead of the Id keyword.


Idioms

What are the common idioms that people use to extract values out of the expansions of the keyword?

What are the tricks in parsing the different subparts out of the expansion of Id?