bzr blame fail with KeyError in _expand_annotations

Bug #393905 reported by Nir Soffer
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Incomplete
Medium
Philip Peitsch

Bug Description

The branch is identical to the one in bug https://bugs.launchpad.net/bzr/+bug/393837.

bzr blame HGSConfig.php
bzr: ERROR: exceptions.KeyError: 'nirs@hardy-20090624143342-amb8bnajxdukfvbo'

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 939, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4256, in run
    show_ids=show_ids)
  File "/usr/lib/python2.6/dist-packages/bzrlib/annotate.py", line 103, in annotate_file_tree
    current_rev))
  File "/usr/lib/python2.6/dist-packages/bzrlib/annotate.py", line 228, in _expand_annotations
    rev = revisions[origin]
KeyError: 'nirs@hardy-20090624143342-amb8bnajxdukfvbo'

bzr 1.16.1 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'blame', 'HGSConfig.php']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.16]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [1.16.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [1.16.1]
  svn /home/nirs/.bazaar/plugins/svn [0.6.2]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Tags: annotate

Related branches

Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: annotate
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
assignee: nobody → Philip Peitsch (philip-peitsch)
Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

I've attached a script that uses bzr-svn to create a ghost-revision to reproduce this bug reliably

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

At least with the script you've provided I can't reproduce this bug with current versions of bzr-svn/bzr.

Changed in bzr:
status: In Progress → Incomplete
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Sorry, that sounds a bit harsh. I meant to say I can /no longer/ reproduce this bug with current versions of bzr-svn/bzr. I was able to reproduce at least one of the two ghost issues you reported earlier.

Revision history for this message
Francis Devereux (frankoid) wrote : Re: [Bug 393905] Re: bzr blame fail with KeyError in _expand_annotations

On 1 Oct 2010, at 09:58, Jelmer Vernooij wrote:

> Sorry, that sounds a bit harsh. I meant to say I can /no longer/
> reproduce this bug with current versions of bzr-svn/bzr. I was able to
> reproduce at least one of the two ghost issues you reported earlier.

Does this mean that current versions of bzr-svn/bzr can deal with ghost revisions or they don't create them any more? If it means that they don't create them any more but still can't deal with them being present is there any way of fixing existing repositories that contain ghost revisions?

Also, by "current versions" do you mean "current in-development versions" or "current releases i.e. bzr 2.2.1 / bzr-svn 1.0.4"?

Thanks,

Francis

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Fri, 2010-10-01 at 09:15 +0000, Francis Devereux wrote:
> On 1 Oct 2010, at 09:58, Jelmer Vernooij wrote:
>
> > Sorry, that sounds a bit harsh. I meant to say I can /no longer/
> > reproduce this bug with current versions of bzr-svn/bzr. I was able to
> > reproduce at least one of the two ghost issues you reported earlier.
>
> Does this mean that current versions of bzr-svn/bzr can deal with ghost
> revisions or they don't create them any more? If it means that they
> don't create them any more but still can't deal with them being present
> is there any way of fixing existing repositories that contain ghost
> revisions?
>
> Also, by "current versions" do you mean "current in-development
> versions" or "current releases i.e. bzr 2.2.1 / bzr-svn 1.0.4"?
I've only tried with bzr 2.2.1 / bzr-svn trunk, but I don't think we've
made any chance to bzr-svn trunk since 1.0.4 that would affect this.

The only thing I've tried is Philip's script, which creates a svn
repository that introduces ghosts and then attempts to clone from it and
annotate against it in one go. I don't think we can handle existing
repositories with (these) ghosts. The ghosts that bzr-svn creates are
now more like the ghosts that Bazaar already had to deal with earlier,
which it handles a fair bit better.

You should be able to "fix" your existing repositories to work around
this problem by creating a new shared repository and before cloning any
of your existing branches into it doing a fresh clone from Subversion
into the shared repository, then fetching from your existing branches.
Bazaar will not fetch revisions again after it has fetched them once.

Cheers,

Jelmer

Revision history for this message
Gordon Tyler (doxxx) wrote :

I just got this error with bzr 2.4.0 and bzr-svn 1.1.0. The repo is private, unfortunately.

Revision history for this message
Martin Pool (mbp) wrote :

doxxx, can you see if Philip's branch fixes it for you?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.