info-cvs
[Top][All Lists]
Advanced

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

Re: cannot commit ... sticky tags


From: Pierre Asselin
Subject: Re: cannot commit ... sticky tags
Date: 8 Jan 2002 20:29:52 -0600

I missed the original, but the followup had enough quoted text...

>donald
>On Mon, Jan 07, 2002 at 05:12:44PM -0800, Schwenk, Jeanie wrote:
>> I'm using cvs 1.11 on hpux.
>> 
>> I tagged the Aug 21 release with the tag Release_Aug21_2001.  Just a plain
>> tag.  
>> 
>> While I was out for several weeks, the vendors who happen to be on the other
>> side of the world put a sticky tag on every file, including those I am
>> editing.

This doesn't make sense.  A tag can only be sticky in connection with
a sandbox.  Assuming you're not sharing sandboxes (say you're not
sharing sandboxes!) the only one who could have stuck your sandbox is
you.

One easy (too easy) way to get a sandbox with a sticky tag is to do

    $ cvs checkout -rRelease_Aug21_2001 <module>

or, from an already checked-out sandbox,

    $ cvs update -rRelease_Aug21_2001

Presto, sticky tag (as witnessed by "cvs status").  What does this
mean?  That if you issue a cvs command from that sandbox, there is an
implied argument "-rRelease_Aug21_2001".  In particular, "cvs commit"
really meand "cvs commit -rRelease_Aug21_2001", and that's not
allowed.

The usual way out of this predicament is

    $ cvs update -A

This is appropriate if you're done with Release_Aug21_2001 and you
want to keep developing on the trunk.  From your message, this is what
you want.  The update does two things:

    1)  Removes the sticky tag *from your sandbox*;  "cvs commit" will
        now mean plain "cvs commit".

    2)  Merges the uncommitted changes you made in the sandbox with
        whatever changes other people have committed to the trunk
        since Release_Aug21_2001 while you weren't looking.  If nobody
        else committed anything, this step will do nothing.  If there
        have been intervening commits, the merge will do something
        nontrivial and may generate conflicts, like a "cvs update"
        from a normal sandbox.

    3)  Mark your files as based on the tip of the trunk, when
        before they were based on the revision numbers that correspond
        to Release_Aug21_2001.  That is, your files are now "up to date".

OK, three things not two.  Check for conflicts and fix them.
You can now do a "cvs commit".


The unusual way out is to get on a branch.  This is appropriate if
your changes are *not* part of the mainline development but are
bugfixes to Release_Aug21_2001 only.  To branch,

    $ cvs tag -b -rRelease_Aug21_2001_bugfix
    $ cvs update -rRelease_Aug21_2001_bugfix

The first command just creates the branch.  The second command again
does two^Wthree things:

    1)  Replaces your sticky tag of Release_Aug21_2001 by a new sticky
        tag of Release_Aug21_2001_bugfix.  That is, "cvs commit" will
        really mean "cvs commit -rRelease_Aug21_2001_bugfix" from now on.

    2)  Merges the uncommitted changes you made in the sandbox with
        whatever changes other people have committed on the branch.
        Well, the branch is still empty, so this step does nothing.

    3)  Marks your files as based on the tip of the branch.  You're
        already on the tip, so nothing really happens.

Now you can commit.  The sticky tag doesn't get in the way, it just
puts your changes on the bugfix branch instead of the trunk.

After you commit, a "cvs update -A" gets you back to the trunk
(without the bug fixes).  This is another vacuous merge:  the changes
required to transform the tip of Release_Aug21_2001_bugfix into your
sandbox (empty, you just committed and didn't change anything), plus
the changes required to transform the tip of Release_Aug21_2001_bugfix
into the tip of the trunk (not empty, just a straightforward patch).
Result, you're up to date with the trunk  --and the sticky tag is gone.

The bug fixes are not on the trunk.  To get them, you merge the
branch.  Tag the tip of the branch and merge.

    $ cvs tag -rRelease_Aug21_2001_bugfix Release_Aug21_2001_p01
    $ cvs update -jRelease_Aug21_2001 -jRelease_Aug21_2001_p01

Fix conflicts, tests, etc.  Commit.  Ship Release_Aug21_2001_p01.
Optionally, plant a moving tag to remember what you merged.

    $ cvs tag -F -rRelease_Aug21_2001_p01 Release_Aug21_2001_bugfix_MERGED

--
Pierre Asselin
Westminster, Colorado


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


reply via email to

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