[Bug 393905] Re: bzr blame fail with KeyError in _expand_annotations

Francis Devereux francis at devrx.org
Wed Oct 6 09:50:31 BST 2010


Hi,

I thought I'd take this to the list instead of replying to the bug because I don't want to spam the bug with my possibly-unrelated questions. Please let me know if you'd prefer me to update the bug (or create another one).

On 1 Oct 2010, at 10:43, Jelmer Vernooij 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.

I tried to fix my repositories with the following steps but got an error. Is this what you meant?

# Create a new repository
bzr init-repo asset-bank-new
cd asset-bank-new
bzr co svn+ssh://oursvnserver/home/svn/repos/Websites/asset-bank svn-trunk
# at this point I left things for a few days because I was busy with other things, then I came back to fixing the repository and did a "bzr update" in svn-trunk

# copy a branch from the old repository with ghosts into the new clean one
bzr branch ../asset-bank-old-with-ghosts/bluebooks bluebooks

This resulted in the following error:
bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Cannot add revision(s) to repository: missing chk node(s) for id_to_entry maps                                

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 705, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/builtins.py", line 1246, in run
    source_branch=br_from)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/bzrdir.py", line 1257, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repository.py", line 1740, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repository.py", line 3448, in fetch
    find_ghosts=find_ghosts)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/fetch.py", line 73, in __init__
    self.__fetch()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/fetch.py", line 99, in __fetch
    self._fetch_everything_for_search(search)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/fetch.py", line 127, in _fetch_everything_for_search
    stream, from_format, [])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repository.py", line 4287, in insert_stream
    is_resume)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repository.py", line 4387, in _locked_insert_stream
    hint = self.target_repo.commit_write_group()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repository.py", line 1599, in commit_write_group
    result = self._commit_write_group()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repofmt/pack_repo.py", line 2311, in _commit_write_group
    hint = self._pack_collection._commit_write_group()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/repofmt/pack_repo.py", line 2149, in _commit_write_group
    "Cannot add revision(s) to repository: " + problems_summary)
BzrCheckError: Internal check failed: Cannot add revision(s) to repository: missing chk node(s) for id_to_entry maps

bzr 2.2.1 on python 2.6.6 (Darwin-10.4.0-i386-64bit)
arguments: ['/opt/local/bin/bzr', 'branch', '../asset-bank-old-with-ghosts/bluebooks', 'bluebooks']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_GB.UTF-8'
plugins:
  bash_completion      /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/bash_completion [2.2.1]
  bzrtools             /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/bzrtools [2.2.0]
  colo                 /Users/francis/.bazaar/plugins/colo [0.2.0dev]
  diffstat             /Users/francis/.bazaar/plugins/diffstat [0.2.0]
  explorer             /Users/francis/.bazaar/plugins/explorer [1.0.0]
  grep                 /Users/francis/.bazaar/plugins/grep [0.5.0dev]
  launchpad            /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/launchpad [2.2.1]
  netrc_credential_store /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.2.1]
  news_merge           /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/news_merge [2.2.1]
  qbzr                 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/qbzr [0.19.1]
  rewrite              /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/rewrite [0.6.1]
  search               /Users/francis/.bazaar/plugins/search [1.7.0dev]
  svn                  /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/svn [1.0.4]
  xmloutput            /Users/francis/.bazaar/plugins/xmloutput [0.8.7.dev]

*** Bazaar has encountered an internal error.  This probably indicates a
    bug in Bazaar.  You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

I can probably do without the old branches - I've merged all of them except one into the svn trunk, and the one that isn't unmerged I can replicate by branching from the new checkout of svn trunk and re-applying the changes by hand (it's a fairly new branch).

Cheers,

Francis




More information about the bazaar mailing list