KeyError in generate_root_texts during push

Bug #264321 reported by James Westby
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Unassigned

Bug Description

Hi,

I just tried to push to an existing branch, and got the following traceback.

$ bzr -Dtransport -Dhpss push
Using saved push location: bzr+ssh://alioth.debian.org/bzr/pkg-bazaar/bzr-builddeb/trunk/
Server does not understand Bazaar network protocol 3, reconnecting. (Upgrade the server to avoid this.)
Format <RepositoryFormatKnit3> for bzr+ssh://alioth.debian.org/bzr/pkg-bazaar/bzr-builddeb/trunk/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
bzr: ERROR: exceptions.KeyError: '<email address hidden>'

Traceback (most recent call last):
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/builtins.py", line 815, in run
    use_existing_dir=use_existing_dir)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/branch.py", line 1745, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/branch.py", line 1787, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/branch.py", line 1810, in _basic_push
    graph=graph)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/remote.py", line 1661, in update_revisions
    self.fetch(other, stop_revision)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/branch.py", line 270, in fetch
    pb=nested_pb)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/remote.py", line 793, in fetch
    source, revision_id=revision_id, pb=pb)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/repository.py", line 981, in fetch
    find_ghosts=find_ghosts)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/repository.py", line 2947, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 436, in __init__
    last_revision, pb, find_ghosts)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 110, in __init__
    self.__fetch()
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 140, in __fetch
    self._fetch_everything_for_search(search, pp)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 190, in _fetch_everything_for_search
    self._generate_root_texts(revs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 439, in _generate_root_texts
    self.helper.generate_root_texts(revs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/fetch.py", line 351, in generate_root_texts
    rev_order]
KeyError: '<email address hidden>'

Local:
Bazaar pack repository format 1 with rich root (needs bzr 1.0)
Bazaar-NG branch format 5

Remote:
Bazaar Knit Repository Format 3 (bzr 0.15)
Bazaar-NG branch format 5

The revision id it is complaining about is the merge that I just committed.

I am using bzr.dev pulled a few hours ago.

Attached is bzr.log with -Dtransport -Dhpss.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :
Revision history for this message
James Westby (james-w) wrote :

This works fine with 3666, and fails with 3667, which is the merging
of the 1.6 branch. 3606.10.1 also shows the problem.

It fails with the current tip of 1.6 as well.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

Further bisection suggests that it is

revno: 3620
revision-id: <email address hidden>
parent: <email address hidden>
committer: John Arbash Meinel <email address hidden>
branch nick: rich_root_serializer
timestamp: Thu 2008-08-28 21:39:18 -0500
message:
  Create a new --1.6-rich-root, deprecate the old one.

that caused this, but I can't see how this change would interfere with this.

Thanks,

James

Revision history for this message
John A Meinel (jameinel) wrote :

This is, in fact, quite strange. As I didn't change anything for the 'rich-root-pack' format or 'rich-root'. I only changed the '1.6-rich-root' format into the '1.6.1-rich-root' format.

Ah, I think I found it, but why...

Specifically, it is now using the InterKnit1And2 which is not correct for going between a 'rich-root-pack' and a 'rich-root' repository.

However, the model in question seems to explicitly be about "subtrees" not about "rich-root", so I'm guessing I misunderstood what it was thinking. Hopefully Aaron can give some pointers about what Model 1 and Model 2 is, and where "rich-roots" versus "subtree" comes into play.

I'm attaching the part of the change that is causing the problem.

Revision history for this message
John A Meinel (jameinel) wrote :

I'm attaching a possible patch for this.

Fundamentally the problem is the variables "nosubtree" and "subtree" which I was faithfully using as a guide to what formats should be included.

If it actually means "richroot" and "norichroot" the attached patch should work. Can you try it James?

Also, make sure to use copies of the repositories if possible, I don't want the wrong fetcher to cause problems in your production data.

Changed in bzr:
importance: Undecided → Critical
milestone: none → 1.6.1
status: New → Triaged
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 264321] Re: KeyError in generate_root_texts during push

On Wed, 2008-09-03 at 14:48 +0000, John A Meinel wrote:
> I'm attaching a possible patch for this.
>
> Fundamentally the problem is the variables "nosubtree" and "subtree"
> which I was faithfully using as a guide to what formats should be
> included.
>
> If it actually means "richroot" and "norichroot" the attached patch
> should work. Can you try it James?
>

Hi John, this allows me to push.

Thanks,

James

John A Meinel (jameinel)
Changed in bzr:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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