Comment 6 for bug 1890174

Revision history for this message
void-spark (void-spark) wrote :

Ran into this again today on debian bookworm. Seems it can't find a key which comes from a constant breezy.revision.NULL_REVISION. The actual trees map is empty. Bit of logging/debugging:

            for revid in chunk:
                revobj = history[revid]
                if len(revobj.parent_ids) == 0:
                    self.note("PARENT A")
                    parent = breezy.revision.NULL_REVISION
                    self.note("PARENT B")
                    parent = revobj.parent_ids[0]
                self.emit_commit(revobj, self.ref, trees[parent], trees[revid])

16:34:35 Calculating the revisions to include ...
16:34:35 Starting export of 1355 revisions ...
16:34:35 PARENT A
16:34:35 REVOBJ
16:34:35 <Revision id <email address hidden>'>
16:34:35 SELF
16:34:35 b'refs/heads/toykeeper'
16:34:35 parent
16:34:35 b'null:'
16:34:35 trees
16:34:35 {}
brz: ERROR: KeyError: b'null:'

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/", line 1036, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 1228, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/", line 779, in run_argv_aliases
  File "/usr/lib/python3/dist-packages/breezy/", line 804, in run
    return class_run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/", line 505, in run
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/", line 277, in run
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/", line 266, in emit_commits
    self.emit_commit(revobj, self.ref, trees[parent], trees[revid])
KeyError: b'null:'

I used to get around it by using a very old version on debian buster, but for some reason buster takes forever to build it's python packages or something now..