"bzr merge" fails "Branches have no common ancestor"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Gary van der Merwe |
Bug Description
I get
http://
then I prepare two branches:
$] bzr branch mysql-trunk-
Branched 3131 revision(s).
$] bzr branch mysql-trunk-
Branched 3084 revision(s).
$] cd jp/
jp $] bzr merge ../mm
bzr: ERROR: Branches have no common ancestor, and no merge base revision was specified.
This is strange. Both are MySQL branches which have common ancestors (their revno 1 is one, revid:<email address hidden> is another one, and there are tens of thousands of other ancestors).
This merge problem was experienced for real, when creating
http://
A possible cause is the recent introduction of things from svn:
- there was a svn branch of code
- it was converted to bzr with bzr2svn
- the result was merged into the MySQL branch with
cd mysql_branch
bzr merge ../bzr_
mv the merged files into a subdirectory
Maybe those revisions imported from svn confuse "bzr merge". But I heard that there were previous similar merges and they worked.
We are using bzr 2.2.
The developer worked around this merge error by expliciting the common ancestor above:
bzr merge -r 'revid:<email address hidden>..' <mysql-
succeeded.
Related branches
- John A Meinel: Needs Information
-
Diff: 152 lines (+61/-7)5 files modifiedbzrlib/branchbuilder.py (+5/-1)
bzrlib/merge.py (+15/-6)
bzrlib/tests/test_branchbuilder.py (+15/-0)
bzrlib/tests/test_merge.py (+20/-0)
doc/en/release-notes/bzr-2.3.txt (+6/-0)
Changed in bzr: | |
assignee: | nobody → Gary van der Merwe (garyvdm) |
status: | Confirmed → In Progress |
Changed in bzr: | |
importance: | Undecided → Medium |
milestone: | none → 2.3b4 |
status: | In Progress → Fix Released |
I've seen this in another situation too.
Here is what I think is happening; we search for a common merge base by assigning weights to common revisions; if we end up with two (or more) equally weighted revisions, we repeat this recursively.
And I think when we do this, and it hits the start of the branch when there are multiple tails, it blows up.
What it should do, there, is to go into criss-cross weave mode, or something.