Sorry it took so long.
[EMAIL PROTECTED] on 03/09/2000 02:56:57 PM
>Noel L Yap wrote:
>>
>> >I
>> >don't have a clue as to what -j should do in combination with -C.
>>
>> It seems you've been more thorough than I have. Looking at it another way,
"cvs
>> up -C file" should be equivalent to "cvs up -p -r <base-rev> file >file".
If
>> other flags (eg "-j") were specified, the command should be equivalent to
"cvs
>> up -p -r <base-rev> file >file; cvs up <other-flags> file".
>>
>> Noel
>
>Are you sure about '<base-rev>'? From what I've seen so far, -C means 'clean
>copy'. (it's not on my 1.10.5 copy, gotta upgrade).
>
>By '<base-rev>', do you mean the revision last checked out, or the current
>revision for the current sticky tag?
You're right. For consistency's sake, "cvs up -C file" should get a clean copy
of the HEAD. I think, in general, there should be a way to specify the base
revision (is there a BASE alias similar to HEAD?)
>Also, how do these two scripts differ? (I'm not cvs-guru enough to know if they
>do):
>#1
>rm file
>cvs up <all-options> file
>
>#2
>cvs up -p -r <base-rev> file >file
>cvs up <other-flags> file // other-flags may be empty
When specifying the revision via "-r", cvs creates sticky tags (ie the working
directory remembers which version you checked out and any following "cvs up"
commands will update to that revision). Using the redirection gets around this.
>And, if it can be done in a script, does it belong in cvs? :-)
Yes. If CVS supported clean updates, it would be able to do it in one atomic
operation. This would make it twice as fast and more correct as the script
solution.
>p.s. Trivia question: What does this do? What should it do?
>
>echo 'new file' > file
>cvs add file
>cvs update -C file
>
>(note that script 1 leaves it missing, script 2 leaves it empty)
>If you think 'just give an error, do nothing', then what if I'm
>trying to clean up a module, not just a single file?)
This is a good question. I'd lean towards moving the file to a backup.
Noel