info-cvs
[Top][All Lists]
Advanced

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

Re: Removal of tagged files


From: Derek R. Price
Subject: Re: Removal of tagged files
Date: Tue, 19 Jun 2001 13:55:05 -0400

Chris Cameron wrote:

> It is scenario 1 and we're on 1.10.7.  I'll look at getting appropriate
> updates.  Thanks for the info.

[. . .]

> > -----Original Message-----
> > From: address@hidden [mailto:address@hidden Behalf Of
> > Eric Siegerman
> > Sent: Tuesday, 12 June 2001 6:44 a.m.
> > To: Infocvs
> > Subject: Re: Removal of tagged files
> >
> >
> > On Mon, Jun 11, 2001 at 11:46:29AM +1200, Chris Cameron wrote:
> > > We've had the experience of cvs allowing files to be removed from a
> > > non-branch tag!
> >
> > Do you mean by this:
> >   1. cvs update -r release-tag file; cvs rm file
> >   2. cvs tag -d release-tag file
> >   3. something else?
> >
> > If (1), update your CVS.  It prevents this at least from 1.10.8.
> > If (3), please clarify...

I just verified that this is still happening in 1.11.1p1 and the current
development version, but, interestingly enough, it only deletes the tag on
commit and does not corrupt the repository.

I'll grant that this is somewhat intersting behavior and there is special
casing in the remove_file function so it appears to be intentional.  It does
almost exactly what it should, to the extent that anything can be done in
this case.  Of course, it is a bit supprising given the usual behavior of
commits to non-branch tags.

So, I'm torn between leaving well enough alone since it isn't reported as a
problem very often and disabling this behavior since there is another way to
do it and because it seems more consistent.  If the behavior isn't removed it
should probably at least be added to the doc or FAQ.

Can anyone think of a reason why anybody would _want_ to do things this way?
And does the return justify the trouble?  It's the only commit operation
which is valid on static tags.

There's already a test in sanity.sh to confirm the behavior:

          # Now back to tag1
          dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1
${PROG} [a-z]*: file2 is no longer in the repository"

          rm file1
          dotest sticky-16 "${testcvs} rm file1" \
"${PROG} [a-z]*: scheduling .file1. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
          # Hmm, this command seems to silently remove the tag from
          # the file.  This appears to be intentional.
          # The silently part especially strikes me as odd, though.
          dotest sticky-17 "${testcvs} -q ci -m remove-it" ""
          dotest sticky-18 "${testcvs} -q update -A" "U file1
U file2"
          dotest sticky-19 "${testcvs} -q update -r tag1" \
"${PROG} [a-z]*: file1 is no longer in the repository
${PROG} [a-z]*: file2 is no longer in the repository"
          dotest sticky-20 "${testcvs} -q update -A" "U file1

Most of the original code for this seems to be from Jim Blandy.

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden         CollabNet ( http://collab.net )
--
"My father often told me,
We have servants and machines
in order that our will may be carried out
beyond the reach of our own arms.
Machines are more powerful than servants
and more obedient and less rebellious,
but machines have no judgement
and will not remonstrate with us
when our will is foolish,
and will not disobey us
when our will is evil.
In times and places where people despise the gods,
those most in need of servants have machines,
or choose servants who will behave like machines.
I believe this will continue
until the gods stop laughing."

        -Orson Scott Card, "Children of the Mind"






reply via email to

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