Thursday, March 22, 2012

How to add CVS ID Tag (CVS Keywords in source file)


To have the CVS ID tags in your source code, you can basically add the following line to your file:
// $Id$

Once committed, the CVS will automatically update this line, e.g. as follows:
// $Id: file.cpp,v 1.3 2012/03/22 22:41:24 username Exp $

You can also include that in a format as follows:
/*
*====================================================================
* HISTORY:
* -------
* $Log: $
*
*====================================================================
*/

static const char *CvsId = "@(#)$Id$";
void No_Warning_Please(const char *x=CvsId);

A nice webpage and more details on this topic:
http://www.badgertronics.com/writings/cvs/keywords.html



No comments:

Post a Comment