Comment 2 for bug 393366

Revision history for this message
David I (david-ingamells) wrote : Re: [Bug 393366] Re: bzr annotate exceptions.KeyError

Martin Pool wrote:
> Could you please attach the result of running 'bzr info' on the stacked
> branch (with paths obscured if you wish).
On a smaller repos the same occurs:

bzr: ERROR: exceptions.KeyError:
('cmsmanager.ini-20080220104629-krpntudqdg1zfzkp-1',
'<obscured>-20080827133521-mk6up7txygk04r2m')

Traceback (most recent call last):
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/commands.py", line
729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/commands.py", line
924, in run_bzr
    ret = run(*run_argv)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/commands.py", line
560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/commands.py", line
939, in ignore_pipe
    result = func(*args, **kwargs)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/builtins.py", line
4251, in run
    show_ids=show_ids)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/annotate.py", line
89, in annotate_file_tree
    annotations = list(tree.annotate_iter(file_id))
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/decorators.py",
line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/workingtree.py",
line 497, in annotate_iter
    return basis.annotate_iter(file_id)
  File
"/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/workingtree_4.py",
line 1576, in annotate_iter
    annotations = self._repository.texts.annotate(text_key)
  File "/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/knit.py",
line 1006, in annotate
    return self._factory.annotate(self, key)
  File "/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/knit.py",
line 761, in annotate
    return annotator.annotate(key)
  File "/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/knit.py",
line 3567, in annotate
    return self._simple_annotate(key)
  File "/data/id/release/bzr/bzr_20090616/lib/python/bzrlib/knit.py",
line 3607, in _simple_annotate
    parent_lines = [parent_cache[parent] for parent in parent_map[key]]
KeyError: ('cmsmanager.ini-20080220104629-krpntudqdg1zfzkp-1',
'<obscured>-20080827133521-mk6up7txygk04r2m')

bzr 1.15.1 on python 2.5.2 (linux2)
arguments: ['/data/id/release/bzr/current/bin/bzr', 'annotate',
'.cmsmanager.ini']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  bzrtools
/data/id/release/bzr/current/lib/python/bzrlib/plugins/bzrtools [1.15]
  explorer /data/users/<obscured>/.bazaar/plugins/explorer
[0.3.1]
  gtk
/data/id/release/bzr/current/lib/python/bzrlib/plugins/gtk [0.95.0.final.1]
  launchpad
/data/id/release/bzr/current/lib/python/bzrlib/plugins/launchpad [1.15.1]
  netrc_credential_store
/data/id/release/bzr/current/lib/python/bzrlib/plugins/netrc_credential_store
[1.15.1]
  qbzr
/data/id/release/bzr/current/lib/python/bzrlib/plugins/qbzr [0.10]
*** Bazaar has encountered an internal error.

 and this is the info:

$ bzr info
Standalone tree (format:
1.9-rich-root)

Location:
  branch root: .

Related branches:
  parent branch: bzr+ssh://<obscured>/1.0/
     stacked on: bzr+ssh://<obscured>/1.0/
> Can you reproduce it in a
> smaller case?
>
>
what do you mean? Smaller repos? smaller file? smaller history?

It does also occur in about the smallest repos (see above) I have
available here:
One with about 30 files and a current revno of 133.

> ** Changed in: bzr
> Importance: Undecided => High
>
> ** Changed in: bzr
> Status: New => Confirmed
>
> ** Summary changed:
>
> - bzr annotate exceptions.KeyError
> + KeyError in knit.simple_annotate running annotate on a stacked branch
>
>