[Top][All Lists]

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

Better Keyword than $Header$ and $Id$

From: Hon-Chi Ng
Subject: Better Keyword than $Header$ and $Id$
Date: Fri, 27 Oct 2000 19:58:48 -0700


I remember someone mentioned (but, can't recall where) that it's better to use 
$Id$ keyword over $Header$ in source files under CVS.  But, I think we need a 
better keyword for CVS.

My group maintain a set of scripts that are used by other groups within my 
company.  Those scripts are used in source form, and the whole set must be used 
for proper functionality.

I need to mark the source files with keywords, in case there is bug reported, I 
know which file of which release and who was the person in my group made the 
last modification.

The keywords $Header$ and $Id$ sound like the answer, but I'm looking for a 
keyword behaves in between $Header$ and $Id$, specifically the keyword should 
show the path of the file relative to the repository.


  $Header: /mydept/project/customerA/cvsroot/proj3/script/funcA/tcl/foo.tcl,v 
1.3 2000/10/26 12:00:00 honchi_ng Exp $

  $Id: foo.tcl,v 1.3 2000/10/26 12:00:00 honchi_ng Exp $

But, ideally, I would like to have 

  $Info: proj3/script/funcA/tcl/foo.tcl,v 1.3 2000/10/26 12:00:00 honchi_ng Exp 

where CVSROOT=/mydept/project/customerA/cvsroot

The relative path of the source file is important because there are some files 
in directories share the same filename, e.g.


But, I don't need the path of the repository because I don't want users in 
other groups to know the repository and access it directly.  Unfortunately, all 
users can read the repository as it resides in a mountpoint of a filer that is 
exported to all machines, yet they aren't supposed to check out the source 
files themselves.  (Yes, I'm not using client/server mode.  And using 
client/server mode with $Id$ doesn't address my concern either.)

Moreover, the path of the repository is pretty long.  The proposed keyword can 
reduce the length of its value.  (Again, running a build / sed / Perl to trim 
the repository from the paths in the source files after checking out is an 
"ineffective" solution.)

Is there such keyword available in current version of CVS that I'm not aware 
of?  If not, are the CVS developers planning to add such keyword to future 
versions of CVS?  IMHO, this keyword is much useful compared to $Header$ or 

Thanks.  I appreciate if the CVS developers would consider implementing the 
proposed keyword in future versions.  BTW, the name of the keyword can be 
something else -- $Info$ is just for illustration.


--== Sent via ==--
Before you buy.

reply via email to

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