info-cvs
[Top][All Lists]
Advanced

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

Re: Bad vendor branch import on top of non-vendor sources


From: Pierre Asselin
Subject: Re: Bad vendor branch import on top of non-vendor sources
Date: Mon, 24 Jul 2006 03:17:08 +0000 (UTC)
User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (NetBSD/3.0 (i386))

McHenry, Matt <address@hidden> wrote:

>         We just had a mishap with our repository, and I'm hoping for
> some help understanding its implications.  (In other words, are we
> hosed?)

> [ import on the wrong repository ]

> CVSROOT=<private> cvs export -r PRIVATE_TAG module
> cd module
> CVSROOT=<private> cvs import module VENDOR PRIVATE_TAG #should have been
> CVSROOT=<public>

>         What I've discovered so far is that PRIVATE_TAG was moved from
> its old location to the new VENDOR branch (rev. 1.1.1.1 of all affected
> files).  (The PRIVATE_TAG was originally on another branch, not the
> trunk, if that matters.)  This is unfortunate, but as it happens,
> recoverable.

Good, so recover that first.


>         What I don't understand fully (even after some experiments in a
> sandbox repos.) is what the implications are for the trunk in the
> private repos. now that this vendor branch exists.  I've read elsewhere
> that a vendor branch "becomes HEAD" [ ... ]

Do a "cvs log" on one of your files and look for a nonempty "branch" line:

    RCS file: <path to repository file>
    Working file: <your file name>
    head: 1.1
>>> branch: 1.1.1
    ...

The "branch: 1.1.1" is what turns the vendor branch into the head.
This is the RCS branching mechanism and is distinct from the way
CVS does things outside of the vendor branch (with sticky tags in
the sandbox).  You want the "branch" to be empty, like this:

    RCS file: <path to repo file>
    Working file: <your file name>
    head: 1.234
>>> branch:
    locks: strict
    ...

I think all you have to do is a "cvs admin -b" to put all your
files back on the trunk.

> [ ... ] until a commit is made, which I
> don't fully understand to begin with.

Indeed, a commit that creates revision 1.2 also resets
the branch to empty.


> [ ... ]  But I couldn't find anything
> about a vendor branch being created *after* commits had been made on the
> trunk.

Yeah, I'm not clear on that either.  I once had reasons to do
an import on a second vendor branch, 1.1.3, and IIRC only the new
files created by the import had a "branch: 1.1.3".  Files from the
original import(s) still had "branch: 1.1.1" or empty.  So your
repository may be fine since all the files you imported already
existed.  I would just look at the output of "cvs log".

Good luck.


-- 
pa at panix dot com


reply via email to

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