[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Q on keyword substitution]

From: Todd Denniston
Subject: Re: [Fwd: Q on keyword substitution]
Date: Fri, 07 Jan 2005 12:31:38 -0500

jsWalter wrote:
> For @version, yes.
> This "label' should not be changed at each iteration, as VERSION will be.
> But not for @since.
> It is a way of knowing when something was addedd or removed from a file
> based upon the CVS tracking version number
> Walter
CVS might not do it for you, but you might be able to get some where in
between with a combination of $Version: $, commitinfo and a perl (or your
favorite scripting language).

put @since $Version: $ in your document.
check it in, and commitinfo should let it pass.

next time you go to commit it would read something like
@since $Version: 1.250 $

and commitinfo would deny the commit because there is a number between the
if grep "address@hidden" $1 | grep [0-9] >> /dev/null
   echo "hey, you were supposed to run on $1" 
   exit 5
(the above is not tested, and I am going from the way verifymsg works, so

and have the user run to go into the file and change all
@since $Version: 1.250 $
@since 1.250

then add a target in your Makefile(s) to run as needed.
Or if you wanted to do something you might later regret, you could have
commitinfo run, however changing files in-transit between the
user sandbox and the repository is usually a recipe for trouble.
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]