[cvsnt] Support of user-defined Keywords???

x x at x.com
Sat Apr 10 20:00:38 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Some versions of CVS do support the use of user-defined  CVS keywords ($keyword$ expanded in files):

This feature is particularly useful to plonk software versions visible by end-users...  I have to resort to an ugly sed-based preprocessing to do so...

Can I use a TCL based 'trigger' to be lauched prior to committing?

Any info/suggestions?

Thanks for your thoughts...

Vin

from http://www.cvshome.org/docs/manual/cvs-1.12.6/cvs_12.html#SEC98 :


--------------------------------------------------------------------------------

Local keyword 
The LocalKeyword option in the `CVSROOT/config' file may be used to specify a local keyword which is to be used as an alias for one of the other keywords. For example, if the `CVSROOT/config' file contains a line with LocalKeyword=MYBSD=CVSHeader, then a file with the local keyword $MYBSD$ will be expanded as if it were a $CVSHeader$ keyword. If the src/frob.c file contained this keyword, it might look something like this: 

          /*
   * $MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
   */
 

Many repositories make use of a such a "local keyword" feature. An old patch to CVS provided the LocalKeyword feature using a tag= option and called this the "custom tag" or "local tag" feature. It was used in conjunction with the what they called the tagexpand= option. In CVS this other option is known as the KeywordExpand option. See Configuring Keyord Expansion for more details. 

Examples from popular projects include: $FreeBSD$, $NetBSD$, $OpenBSD$, $XFree86$, $Xorg$. 

The advantage of this is that you can include your local version information in a file using this local keyword without disrupting the upstream version information (which may be a different local keyword or a standard keyword). Allowing bug reports and the like to more properly identify the source of the original bug to the third-party and reducing the number of conflicts that arise during an import of a new version. 

All keyword expansion except the local keyword may be disabled using the KeywordExpansion option in the `CVSROOT/config' file--see Configuring Keyord Expansion for more details. 



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook