bug-cvs
[Top][All Lists]
Advanced

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

cvs add -k on branch changes established keyword expansion flag when che


From: Bob Bowen
Subject: cvs add -k on branch changes established keyword expansion flag when checked in
Date: Wed, 10 Feb 2010 17:30:31 -0700

Hello, we just discovered that the keyword expansion mode of a file can
be changed by running cvs add -k to add the file to a branch where it
had not previously existed (and then committing the change). I would not
have believed this possible if I did not reproduce the situation myself.
Even more amazing is that a message is generated indicating that it is
happening!

 

Here's a command sequence to illustrate the situation:

(dir/file.lib does not yet exist in the repository)

 

cvs co -r branch1 dir

cvs add -kk file.lib

cvs stat file.lib        shows sticky options=-kk

cvs ci file.lib

cvs stat file.lib        still shows sticky options=-kk

 

cvs co -r branch2 dir

cvs add file.lib

cvs stat file.lib        shows sticky options=-kb  (CVSROOT/cvswrappers
contains: *.lib -k 'b'         # static lib)

cvs ci file.lib

cvs commit: changing keyword expansion mode of `file.lib' from `-kk' to
`-kb'          (!)

cvs stat file.lib        shows sticky options=-kb

 

 

Why is this allowed to happen? The existing expansion mode should not
change! This affects all other versions of the file. Even worse, it
happens when no explicit action occurred to change the mode.

 

The fact that the message reports the change makes it clear that the
situation is known and understood. But why is it tolerated? It clearly
should not be! Allowing this to happen violates the ability to correctly
retrieve previous versions of the file. 

 

I see that the code was introduced into commit.c on 7/29/2003 by Derek,
but there are no comments as to why. Can anyone enlighten me?

 

Puzzled,

 

=Bob=

 

 



reply via email to

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