Thanks for the suggestion, I have implemented commitinfo script to prevent someone from using $Name$, but I'm curious as to why $Name$ works differently from the other keyword expansions. Why does this keyword cause the file to be locally modified on expansion, when all the other keywords I've used ($Header$, $Id$, etc) all correctly update the field, and leave the file update-to-date? Personally, I consider this a bug in cvs itself. Is there a good reason the file needs to be locally modified after expanding $Name$?
Steve -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Todd Denniston Sent: Thursday, June 23, 2005 8:38 AM To: Jorgensen, Steven Cc: info-cvs@gnu.org Subject: Re: $Name$ causes files to be locally modified > "Jorgensen, Steven" wrote: > > I am having a problem with the $Name$ keyword expansion. We > use a cvs tag to indicate when a file has moved beyond local testing > stage, and is ready for general use by all developers (a release tag > if you will) so that we can automate a update and build process to > keep a working development version of our software compiled for all > developers. So this tag is not permanently attached to a single > revision, rather it moves as files get modified and tested by > individual developers and released for use by other developers. > > The problem I'm having is when people use the $Name$ keyword > in their file. In this tree of "released" software, it causes any > file that contains a $Name$ keyword to be in a "Locally Modified" > state when it is checked out. Where the only difference in the file > is the fact that $Name$ is now filled out. The next time around we run an update on one of > these files that changes, produces a conflict on the $Name$ line. For > example: > > Myheader.h > ----------------------- > > const char *tag = "$Name$"; > > Becomes on the next revision. > > <<<<<<<< Myheader.h > Const char *tag = "$Name: releasetag $"; ====== Const char *tag = > "$Name: $"; > >>>>>>>> 1.2 > > Is there any way to prevent this from happening? On all the other > keyword expansions $Id$, $Header$, etc, the keyword is expanded, but > the file's status is "Up-to-date". > > Thanks for any help. > > Steve > > Steven Jorgensen > [EMAIL PROTECTED] Method #1, I think if the update is done with the '-kk' option it will stop the expansion. Method #2, tell your developers to stop using keywords and remove them where ever they find them. Method #3, do Method #2, and prevent the developers from checking files in to the baseline with the keywords inside, using a commitinfo script. *******begin simplistic commitinfo script (in bash)***** #echo "0($0) 1($1) 2($2) 3($3) @($@)" #get rid of path at the begining shift 1 #echo "0($0) 1($1) 2($2) 3($3) @($@)" ARGS=$@ for i in $ARGS do # cat $i # exit 1 if grep -e \\$Name:\\$ -e \\$Id:\\$ $i then echo " we no longer allow rcs keywords in the files, find your info in the" echo " cvs log from now on." exit 1 fi done *******end simplistic commitinfo script***** BTW never written a commitinfo before, no warranties on the above script. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter _______________________________________________ Info-cvs mailing list Info-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/info-cvs