If a file is deleted that contains keyword substitutions, CVS will include a non-zero "lines modified" count for the deleted revision. Is there a good reason for this behavior? (From my perspective, it seems needlessly inconsistent.)
Specifically: % cvs --version Concurrent Versions System (CVS) 1.12.9 (client/server) [...] % touch a.c % cvs add a.c cvs add: use `cvs commit' to add this file permanently % cvs ci -m "File added." a.c /var/lib/cvs/cvs_test/a.c,v <-- a.c initial revision: 1.1 % rm a.c % cvs delete a.c cvs remove: use `cvs commit' to remove this file permanently % cvs ci -m "File removed." a.c /var/lib/cvs/cvs_test/a.c,v <-- a.c new revision: delete; previous revision: 1.1 % cvs log -r1.2 a.c [...] revision 1.2 date: 2005-02-15 01:17:56 +0000; author: neilc; state: dead; lines: +0 -0 File removed. However, if the file contains a keyword substitution, the "lines:" figure for the deleted revision is non-zero: % cat > b.c $Id$ ... % cvs add b.c cvs add: use `cvs commit' to add this file permanently [neilc:/home/neilc/cvs_test]% cvs ci -m "File added." b.c /var/lib/cvs/cvs_test/b.c,v <-- b.c initial revision: 1.1 % rm b.c % cvs delete b.c cvs remove: use `cvs commit' to remove this file permanently % cvs ci -m "File removed." b.c /var/lib/cvs/cvs_test/b.c,v <-- b.c new revision: delete; previous revision: 1.1 [neilc:/home/neilc/cvs_test]% cvs log -r1.2 b.c [...] revision 1.2 date: 2005-02-15 01:20:02 +0000; author: neilc; state: dead; lines: +1 -1 File removed. The context here is that I'm examining CVS metadata to get a sense of the development activity of a project. Varying the "lines:" figure of a removed file based on whether any keyword substitution took place seems arbitrary, and introduces some error into my analysis. Of course, it's not a huge deal (I can work around this by ignoring "lines modified" figures in dead revisions), but IMHO it would make more sense to change this behavior. You could: - include the number of lines in the file's former content as being "removed" in the deleted revision - or, make the lines modified "0" for a deleted revision, whether keyword substitution took place or not I'd have no quarrel with either behavior; I guess I'd prefer the former, actually, but I'm not militant about it. -Neil _______________________________________________ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs