Possibly Dumb Question about Switching a Bazaar Branch from Subversion to Git
Jelmer Vernooij
jelmer at samba.org
Mon Mar 8 13:23:19 GMT 2010
Hi Russel,
On 03/08/10 14:11, Russel Winder wrote:
> I have got myself in a bit of a tiz about my Gant branches, but it is
> probably because I am missing something simple.
>
> I have a shared repository containing all the maintenance branches of
> Gant plus a trunk. All of these used to be branches bound to a
> Subversion repository. The Subversion repository has now disappeared to
> be replaced by a Git repository. I unbound all the branches and would
> now like to rebind to the Git repository. Clearly for the moment I
> cannot do anything about the maintenance branches, but I should be able
> to do something about the master/trunk branch.
>
> I naïvely tried:
>
> bzr merge --preview<URL>
>
> but it says:
>
> bzr: ERROR: Branches have no common ancestor, and no merge base revision was specified.
>
> which is both true and false. I know the actual content is identical
> but the common ancestor of the Git repository and the Bazaar branch is
> the Subversion repository -- the Git repository I am trying to bind to
> is a mirror of a repository I created from the Subversion repository by
> "git svn-clone --stdlayout . . ."
>
> As a last resort I can just retire the Bazaar shared repository and
> create things anew from the Git repository. So there is no panic --
> except that I will have to overwrite the public branches on Launchpad
> which could be seen as impolite (!) However I have this luxury only
> because the branch/repository is small with only a few thousand
> revisions.
>
> Am I just missing something or is this a dark corner where there be
> dragons?
>
>
There is no common history here, so there isn't much that can be done.
You could do a "bzr merge -r0..-1" to force a merge but you would get a
lot of file conflicts because the files have no common ancestry.
I'd recommend just switching over to the new branch and asking people to
"bzr pull --overwrite" from the public branches to get the new git-based
Bazaar branch.
Cheers,
Jelmer
More information about the bazaar
mailing list