"bzr git-import" and multiple branches
Jelmer Vernooij
jelmer at samba.org
Sun Apr 8 09:34:28 UTC 2012
On Sun, Apr 08, 2012 at 09:46:01AM +0300, Eli Zaretskii wrote:
> > Date: Sun, 08 Apr 2012 01:33:38 +0200
> > From: Jelmer Vernooij <jelmer at samba.org>
> >
> > > I thought perhaps the branches are colocated, but "bzr switch" refuses
> > > to switch to a named branch:
> > >
> > > D:\gnu\bzr\gawk-branches>bzr switch gawk-stable
> > > bzr: ERROR: Cannot switch a branch, only a checkout.
> > >
> > > What am I missing? How do I checkout several branches in a repository
> > > created by git-import?
> > >
> > The branches are created as colocated branches now. "bzr branches"
> > should list them all.
> Thanks, "bzr branches" indeed lists them, and I even see them under
> .bzr/branches, but what do I do to switch between them? As I mention
> above, "bzr switch" errors out. I tried "bzr --no-plugins switch",
> but the error message is the same. Am I doing something wrong?
>
> Perhaps I need to use the colo plugin to access the branches? (I
> thought bzr 2.5 supports colocated branches in the core, is that
> true?)
>
> Or is this a bug? If so, does the traceback below help understand
> what is going on?
It's a more than slightly confusing error message. It's giving this
error message because the history of the two branches has diverged. In
the past it wasn't possible to switch these kinds of checkouts.
Specifying --force should fix it, though we should obviously also fix
the error message.
Cheers,
Jelmer
More information about the bazaar
mailing list