On Thursday, February 17, 2000 11:43 AM, |}avid (opeland
[SMTP:[EMAIL PROTECTED]] wrote:
> Why does CVS treat removed files in such a special way? To be more
specific,
> consider the following example:
>
> > ls
> CVS/
> blah.c
> main.c
> blah.h
>
> > cvs tag -F some_tag
> T blah.c
> T main.c
> T blah.h
>
> [ make changes in blah.c ]
> [ make changes in blah.h ]
>
> > cvs remove -f main.c
> > cvs commit -m ''
> 1.2 <--- blah.c
> 1.2 <--- main.c
> 1.2 <--- blah.h
>
> > cvs tag -F some_tag
> T blah.c
> T blah.h
>
> Note that main.c DOES NOT get tagged. Even if you 'cvs tag -F some_tag
main.c'
> it does not get tagged. You can ONLY tag the new (dead) revision, via
> 'cvs tag -r 1.2 main.c', which is cumbersome, because not all files in a
source
> tree are on the same revision. You can also do 'cvs tag -r HEAD main.c',
but
> this doesn't have the correct behaviour on a branch.
>
Sorry, I'm a bit confused why do you want the removed file tagged? It no
longer exists! It isn't part of some_tag because you removed it. The
point of tags is to be able to recreate your source tree as at a particular
point in time. If you remove a file it is no longer part of the tree,
therefore you don't need it. If you still need it don't remove it and all
will work correctly.
Internally CVS will place the file into the Attic. That way any tags which
included the file can still be checked out, but this file is no longer a
default file for that directory.
> also, doing commands like 'cvs log' and 'cvs stat' (with no file
arguments) do
> not produce output for removed files.
>
It is removed, why should the log and stat still care about it?
A diff with the previous tag will show that it is gone and the log message
should record why it was removed, so a future developer can understand what
happened. If you add main.c again in the future, the Attic version will be
resurrected and all your revision history from before the rm will be
restored.
> This makes it extremely difficult to do ANYTHING in batch mode with CVS
and I
> can think of no explanation for it (other than convienience while coding
CVS
> features/throwback to RCS).
>
What types of things in batch mode?
> Can anyone think of a reason why CVS behaves this way and if others think
this
> actually a bug?
>
AFAIK that is the way it is designed to work. I haven't seen any other
complaints. It is quite logical to me!
> At the very least there should be an option to cvs that says "Run the
command
> on removed/dead revisions"
>
That is a possible option, but why?
***************************************************************
Chris Cameron Open Telecommunications NZ Ltd
Software Development Team Leader
[EMAIL PROTECTED] P.O.Box 10-388
+64 4 495 8403 (DDI) The Terrace
fax: +64 4 495 8419 Wellington
cell: +64 21 650 680 New Zealand
Life, don't talk to me about life ....(Marvin - HHGTTG)