CVS Ids in source files

Roland Illig roland.illig at gmx.de
Wed May 11 15:51:13 UTC 2005


Pavel Roskin wrote:
> On Tue, 2005-05-10 at 23:02 +0200, Roland Illig wrote:
> 
>> I would like to include a declaration like the following into every
>> .c file.
>> 
>> static const char mc_cvsid[] = "$Id";
> 
> Please don't do it. CVS doesn't handle it properly.

> It can cause conflicts when merging branches.

That might be. I don't have much experience using CVS branches.

> Also, the Id in CVS is rather meaningless.

No, it isn't. It shows the current revision of each file.

> Every file has its own revision.

That's exactly what I want. Suppose someone updates mc from CVS, then 
waits a week, then updates only the src/ directory and then compiles mc.

> There is no single revision for the tree.

With a single revision for the tree, you cannot detect the above scenario.

> There is no way to find the branch the file Id.

There is. Take the $Revision$ and run "cvs log" to check out which 
symbolic name corresponds to the Revision.

> In fact, CVS doesn't seem to have any keyword that would indicate the
> branch.

No, it does that with the $Revision$ number.

Roland



More information about the mc-devel mailing list