I'm running client/server cvs-1.10.8 (with some "cvs edit" patches). The
command ("cvs up -C file") works fine if noone has yet checked in "file" (after
the local copy had been checked out). However, it doesn't work in the following
situation:
user1 user2
1. cvs co module cvs co module
2. cd module cd module
3. # modify file # modify file
4. cvs ci file
5. cvs up -C file
Upon step 5, user1 gets:
(Locally modified loginfo moved to .#file.1.1)
cvs [server aborted]: cannot open loginfo for copying: No such file or directory
I've traced the abort to the function merge_file in update.c but I think the
solution is not to call this function to begin with (ie why merge at all when
the user wants a clean copy?) Again, I think the default clean version should
be the HEAD but the user should be able to specify easily the BASE revision.
Also, if a revision is specified, the "-A" flag should work as advertised and
prevent stickiness.
Noel
[EMAIL PROTECTED] on 03/08/2000 01:27:18 PM
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject: Re: cvs up -C bug(s)
"Noel L Yap" <[EMAIL PROTECTED]> writes:
> "cvs up -C file" doesn't work correctly if "file" has been modified
> both in the repo and the working directory (ie a merge is "needed").
> IMO, you should wind up with a clean repo copy (ie no merge). The
> default repo copy should be the HEAD (for consistency -- does anyone
> know of an easy way to specify the base rev?).
> There's also a problem with sticky tags when specifying "-r" with it
> (specifying "-A" on the same command line doesn't seem to help).
Your understanding of its intended behavior is correct -- in fact, the
whole point of this option is to discard local changes. But I'm not
able to reproduce the problem -- when I modify a formerly unmodified
file, and then do
cvs update -C <file>
I get the clean repository copy back, exactly as it's supposed to
work. This happens both locally and client server. It is also
what the sanity.sh test case for update -C tests.
Are you running client/server, and if so does your server, as well as
the client, know about the update -C option? If yes, then can you
send a detailed reproduction recipe to [EMAIL PROTECTED]?
Thanks,
-Karl