iter_merge_sorted_revisions fails on doubly-stacked branch

Bug #571962 reported by Michael Hudson-Doyle on 2010-04-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

If a branch is stacked on a branch which is itself stacked, iter_merge_sorted_revisions on the 'top' branch fails:

mwh@grond:stacking-test$ bzr init base
Created a standalone tree (format: 2a)
mwh@grond:stacking-test$ bzr ci --unc -d base -m .
bzr: ERROR: no such option: -d
mwh@grond:stacking-test$ bzr ci --unc base -m .
bzr: warning: The commit message is a file name: ".".
(use --file "." to take commit message from that file)
Committing to: /home/mwh/tmp/stacking-test/base/

You need a passphrase to unlock the secret key for
user: "Michael Hudson <email address hidden>"
1024-bit DSA key, ID 6EC0EE48, created 2007-09-28

Committed revision 1.
mwh@grond:stacking-test$ bzr branch --stacked base middle
Created new stacked branch referring to file:///home/mwh/tmp/stacking-test/base/.
mwh@grond:stacking-test$ bzr ci --unc -d middle -m ..
bzr: ERROR: no such option: -d
mwh@grond:stacking-test$ bzr branch --stacked middle top
Created new stacked branch referring to file:///home/mwh/tmp/stacking-test/middle/.
mwh@grond:stacking-test$ cd top/
mwh@grond:top$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> b ='.')
>>> list(b.iter_merge_sorted_revisions())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 4, in iter_merge_sorted_revisions_read_locked
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 454, in iter_merge_sorted_revisions
  File "_known_graph_pyx.pyx", line 639, in bzrlib._known_graph_pyx.KnownGraph.merge_sort
  File "_known_graph_pyx.pyx", line 754, in bzrlib._known_graph_pyx._MergeSorter.__init__
KeyError: ('<email address hidden>',)

If the stackings are non-trivial (i.e. there is a revision in middle's repo that is not present in base's repo), it doesn't crash, but something's not right either. I'll attach a script that reproduces this.

Michael Hudson-Doyle (mwhudson) wrote :

Here's a shell script that reproduces the problem. Look at the difference in the output of 'log --include-merges' between top and top-stacked.

Andrew Bennetts (spiv) on 2010-04-30
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
tags: added: stacking
Martin Pool (mbp) on 2010-04-30
Changed in bzr:
importance: High → Medium
Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers