info-cvs
[Top][All Lists]
Advanced

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

Re: sticky non-branch tags are sometines treated as branches in empty


From: Alvaro Martinez Echevarria
Subject: Re: sticky non-branch tags are sometines treated as branches in empty
Date: Tue, 9 Dec 2003 16:06:49 -0800 (PST)

On Wed, 3 Dec 2003, Larry Jones wrote:

> > However, we have found out that sometimes commit on these sticky tags
> > succeed, because CVS somewhere in the process _converts_ the sticky
> > normal tag into
> > a branch! This happens when there are empty directories in the
> > tree on which cvs update -r TAG has been done.
>
> The problem is that tags do not have an independent existance -- they
> only exist inside RCS files.  Thus, a tag can be a branch tag in one
> file and a non-branch tag in another.  The rule CVS uses is that if the
> tag is a non-branch tag in any file in the directory, then the tag is
> marked as a non-branch tag in the CVS/Tag file; otherwise, it is marked
> as a branch tag, which naturally results in a branch tag in an empty
> directory.  Just one more reason why you should always use -P on
> checkout and update and not try to store empty directories in CVS.

Unfortunately the problem seems a bit deeper than that: the above
rule doesn't seem to make any sense for parent directories (which
by nature aren't empty), even if there are files there that
contain the non-branch tag, as long as nothing is checked out on
them. For example, starting on an empty directory:

   mkdir repo
   cd repo
   cvs -d <WHATEVER> co -r MYTAG parent/anotherparent/subdir

In this case cvs has to create parent and then
parent/anotherparent before checking out the subdirectory we are
really interested in. Not only parent and parent/anotherparent
have a CVS/Tag file (IMO they shouldn't at all), but their tag is
marked as branch (which, again, is wrong).

The problem keeps happening every time you check out a tagged
subdirectory, i.e.:

   cvs -d <WHATEVER> co -r SOMEOTHERTAG parent/subdir2

will put a "fake branch" SOMEOTHERTAG on parent/CVS/Tag. So if
you are not careful you end up generating random branches all
over the place every time you try to add new files or directories.

My question is, because I invoke the above commands from a
wrapper, is it a valid and safe workaround to manually remove
CVS/Tag files from the parent directories after running the
checkouts?
Regards,

--
Álvaro Martínez Echevarría    alvarom NO_SPAM_NONONO cisco.com
Cisco Systems
SJC24/3/A5-3
510 McCarthy Blvd.
Milpitas, CA 95035
Phone: +1-408-526-7179






reply via email to

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