info-cvs
[Top][All Lists]
Advanced

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

Re: cvs up and strange warnings for removed files


From: Todd Denniston
Subject: Re: cvs up and strange warnings for removed files
Date: Thu, 15 Jul 2010 11:45:07 -0400
User-agent: Thunderbird 2.0.0.24 (X11/20100318)

Andrea Galbusera wrote, On 07/14/2010 10:49 AM:
> Hello CVS people,
> 
> I recently faced a strange behaviour, while using CVS update command.
> Creating a file in my sandbox with the same name of a previously
> removed file (I mean I file that some time in the past was in the
> repository and then it was removed) and then running 'cvs -nq up',
> ends up warning me with the following message:
> 
> cvs update: use 'cvs add' to create an entry for 'myfile'
> 
> Since I never noticed this before I decided to investigate and finally
> found out that such a behaviour depends on the way I initially check
> out my sandbox. Let me explain: checking out the source from a local
> repository location draws to the warnings above, while checking out
> from remote repository location gives no warning. Note that the
> repository I check out from is the same: I simply change the method to
> access it.
> 
> Here is the complete command sequence that makes the mismatching
> behaviour reproducible. 'myfile' is a file that was previously removed
> from repository.
> 
> Local checkout:
> ------------------------
> $ cvs -d/cvsroot co -d ./sw-test-local -r mytag my/project
> $ cd ./sw-test-local
> $ touch myfile
> $ cvs -n up
> cvs update: use 'cvs add' to create an entry for 'myfile'
> 

This is what I would expect you would need to do for a file name that in the 
past was in the
repository, but has been `cvs remove`ed.  i.e. the same as for a file that has 
never existed.
However I could see it getting annoying to have that much verbiage coming out 
for every file that
has not yet been added to the repository... might have been a bad idea to make 
the change in this
behavior (between 1.11 & 1.12), or at least not make it optional.

> Remote checkout:
> ----------------------------
> $ cvs -d:ext:address@hidden:/cvsroot co -d ./sw-test-remote -r mytag 
> my/project
> $ cd ./sw-test-remote
> $ touch myfile
> $ cvs -nq up
> ? myfile
> 

I did not expect this to be different from above, but after thinking a little 
while...
the data in ./sw-test-remote/CVS/* will be for what exists in the current 
trunk/branch and not the
"DEAD" (i.e., removed) files, and apparently the client server protocol does 
not send the same
amount of information as the client has when it is operating directly on the 
repository directory
structure.


> I believe the 'remote' scenario is less confusing; this is also what I
> was used to up to this morning, since I usually access the repository
> from a different host.
> 
To me the local is clearer, but they both mean the same thing... CVS 
_currently_ knows nothing about
./sw-test-local/myfile or ./sw-test-remote/myfile, and thus `cvs add myfile` 
needs done.  The
difference is that in local mode cvs is aware that CVS _once_ was managing the 
file.

> Does anybody know the reasons behind this mismatch? Is there anything
> I can do to avoid those confusing warnings. I have developers that
> access the repository locally and others that connect remotely: since
> I recently removed from cvs control some autotools artifacts that get
> recreated inside sandbox at every build, this may lead to unnecessary
> confusion for everybody.
> 
> TIA for any hint on this.
> 
> Regards,
> Andrea
> 
if you
cvs -d/cvsroot co -d ./sw-test-local -r mytag my/project
cd ./sw-test-local
touch myneverseenbeforename
cvs -n up

does myneverseenbeforename get the same "cvs update: use 'cvs add' ..." message?
If it does, then it is because in local mode for 1.12 someone has added that 
any unknown file should
get that message, but they did not do so for remote work... there should be 
some consistency.


I think this message is new in 1.12.X you are using, because I get different 
results:
mkdir -p /tmp/testcvs/repo/junkme
cd /tmp/testcvs/
cvs -d/tmp/testcvs/repo/ init
cvs -d /tmp/testcvs/repo/ version
###receive:
Concurrent Versions System (CVS) 1.11.22 (client/server)
####
cvs -d/tmp/testcvs/repo/ checkout junkme
cd junkme/
touch myfile
cvs add myfile
cvs commit -m"put the file in cvs" myfile
cvs remove -f myfile
cvs commit -m"remove the file from cvs" myfile
touch junkme
cvs -n update
###receive:
cvs update: Updating .
? junkme
####
cd /tmp/testcvs/
cvs -d/tmp/testcvs/repo/ checkout -d junkmelocal junkme
cd junkmelocal
touch junkme
cvs -n update
###receive:
cvs update: Updating .
? junkme
####
cd /tmp/testcvs/
export CVS_RSH=ssh
cvs -d:ext:address@hidden:/tmp/testcvs/repo/ checkout -d junkmeremote junkme
cd junkmeremote/
touch junkme
cvs -n update
###receive:
? junkme
cvs update: Updating .
####



-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter



reply via email to

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