[Top][All Lists]

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

Re: Merging in CVS

From: Kaz Kylheku
Subject: Re: Merging in CVS
Date: 5 Dec 2002 12:20:29 -0800

address@hidden (Stephen Cameron) wrote in message news:<address@hidden>...
> On 4 Dec 2002 11:49:25 -0800, Kaz Kylheku <address@hidden> wrote:
> [...]
> >CVS allows an existing tag to be pushed to the tip of a branch in one
> >operation (tag -F) so with this method we don't have to invoke an
> >additional time-consuming untag operation to clean out an obsolete
> >tag.
> Hmm.  What about this?
> bash-2.04$ ls
> CVS  foo
> bash-2.04$ cvs tag mytag
> cvs tag: Tagging .
> T foo
> bash-2.04$ rm foo
> bash-2.04$ cvs rm foo
> cvs remove: scheduling `foo' for removal
> cvs remove: use 'cvs commit' to remove this file permanently
> bash-2.04$ cvs commit -m 'removed foo'
> cvs commit: Examining .
> Removing foo;
> /home/scameron/foo/foocvs/x/foo,v  <--  foo
> new revision: delete; previous revision: 1.1
> done
> bash-2.04$ cvs tag -F mytag
> cvs tag: Tagging .
> bash-2.04$ cvs update -r mytag
> cvs update: Updating .
> U foo
> The tag does not get removed from foo, 
> though you probably wanted it to be.

What's worse, rtag has the same problem, because it ignores things in
the Attic directory! Ah, the stupid Attic hack.

This problem does not occur in Meta-CVS right now, because it
currently does not support merging from the trunk; so the tags it
applies with rtag are always done with -F and -r <branch>. This does
move the tags on removed files forward to their dead revisions.

But guess what? There is a workaround for the main trunk. If you use

    rtag -r HEAD -F mytag module

then it *does* push the tag forward onto the 1.2 dead revision! Only
if you don't specify a revision does it ignore the Attic files. This
is acceptable; I don't care for having the tag removed; moving it to
the dead revision is okay. If I add to Meta-CVS the support for
merging from HEAD up to a branch, then this little trick will help.

> Or did I miss something?
> For moving tags I have been doing this:
> cvs rtag -d mytag module
> cvs rtag mytag module 

There is also the -a option of rtag, which will remove the tag from
deleted files. I think that if you combine -a and -F, you get the
behavior you are looking for.

reply via email to

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