[Top][All Lists]

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

Re: Problem with importing third-party sources and adding/committing cha

From: Pierre Asselin
Subject: Re: Problem with importing third-party sources and adding/committing changes
Date: Fri, 12 Nov 2004 00:56:40 +0000 (UTC)
User-agent: tin/1.6.1-20030810 ("Mingulay") (UNIX) (NetBSD/1.5.4_ALPHA (i386))

Allen Sturtevant <address@hidden> wrote:

> % cvs import -ko -m "foobar v1.11.17" pub/foobar-1 foobar-1 foobar-1_11_17

So far, so good.

>      Later I import a newer version of this software:

> % cvs import -ko -m "foobar v1.12.9" pub/foobar-1 foobar-1 foobar-1_12_9

Side note: if you never made changes on your trunk, you're ok.  If
you ever committed changes to 1.11.17 on your trunk, you need to
perform a merge, as in

> [ ... ]
>      I later need to fix a bug in foobar-1_11_17, so I
> check it out to modify it specifically:

> cvs checkout -r foobar-1_11_17 pub/foobar-1

>      This results in the following "Sticky Tag" on all
> files in my working copy, again as reported by
> "cvs status -v":

>    Sticky Tag:          foobar-1_11_17 (revision:

Yes.  You won't be able to commit changes, until...

>      Now I add a new file called new.c and modify a file
> called build.c, but when I try to add or commit my
> changes back to CVS, I get the following errors:

> % cvs add new.c
> cvs add: cannot add file on non-branch tag `foobar-1_11_17'
> % 
> % cvs commit -m "fixed a bug" build.c
> cvs commit: sticky tag `foobar-1_11_17' for file `build.c' is not a branch
> cvs [commit aborted]: correct above errors first!

... until you create a branch to hold your bug fix.  Without
doing a 'cvs update -A', do this:

    cvs tag -b foobar-1_11_17_bufgix
    cvs update -r foobar-1_11_17_bugfix

Check the sticky tags again, you'll notice a change.

    cvs commit

and this time the commit will go through.

If you want to propagate the change to the trunk, tag it
then return to the trunk then merge.

    cvs tag TEMP
    cvs update -A
    cvs update -j foobar-1_11_17 -j TEMP
(resolve any conflicts and test)
    cvs commit
    cvs tag -F -r TEMP foobar-1_11_17_MERGED

The last command is to plant a "moving" revision tag
at the tip of the branch that you just merged.  You'll need it
if you discover more bugs on 1.11.17 and want to merge
them again to the trunk.  But I digress...  your problem
was the sticky revision tag and the solution is to branch.

pa at panix dot com

reply via email to

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