merging merge-directive fails with "NoSuchRevision: CHKInventoryRepository .. has no revision" in _iter_inventories

Bug #572960 reported by David Graf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

I executed 'bzr merge' on linux with a merge-directive created on windows. I got the following error message:

bzr: failed to report crash using apport:
    AssertionError()
bzr: ERROR: bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///home/sausalito/sausalito/.bzr/repository/') has no revision ('dennis.knochenwefel@28msec.com-20100430135901-6l6m722ytwp74s1o',)

Traceback (most recent call last):
 File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
   return the_callable(*args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
   ret = run(*run_argv)
 File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
   return self.run_direct(**all_cmd_args)
 File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
   return self._operation.run_simple(*args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
   self.cleanups, self.func, *args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
   result = func(*args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3783, in run
   mergeable, pb)
 File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 323, in from_mergeable
   mergeable.get_merge_request(tree.branch.repository)
 File "/usr/lib/python2.6/dist-packages/bzrlib/merge_directive.py", line 607, in get_merge_request
   verified = self._maybe_verify(repository)
 File "/usr/lib/python2.6/dist-packages/bzrlib/merge_directive.py", line 612, in _maybe_verify
   if self._verify_patch(repository):
 File "/usr/lib/python2.6/dist-packages/bzrlib/merge_directive.py", line 593, in _verify_patch
   self.base_revision_id)
 File "/usr/lib/python2.6/dist-packages/bzrlib/merge_directive.py", line 187, in _generate_diff
   tree_1 = repository.revision_tree(ancestor_id)
 File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
   result = unbound(self, *args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2579, in revision_tree
   inv = self.get_revision_inventory(revision_id)
 File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
   result = unbound(self, *args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2538, in get_revision_inventory
   return self.get_inventory(revision_id)
 File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
   result = unbound(self, *args, **kwargs)
 File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2367, in get_inventory
   return self.iter_inventories([revision_id]).next()
 File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 900, in _iter_inventories
   raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: CHKInventoryRepository('file:///home/sausalito/sausalito/.bzr/repository/') has no revision ('dennis.knochenwefel@28msec.com-20100430135901-6l6m722ytwp74s1o',)

bzr 2.1.1 on python 2.6.5 (Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid)
arguments: ['/usr/bin/bzr', 'merge', '/home/sausalito/sausalito/send_dir//Dennis_Knochenwefel_dennis_knochenwefel@28msec_com_21465.diff', '-d', '/home/sausalito/sausalito//Dennis_Knochenwefel_dennis_knochenwefel@28msec_com_21465']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
 bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
 launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.1]
 netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
 news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.1]

*** 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.

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

Do you know anything about the parameters used to create the merge proposal?

summary: - Merging merge-directive failed with an internal error
+ merging merge-directive fails with "NoSuchRevision:
+ CHKInventoryRepository .. has no revision" in _iter_inventories
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
David Graf (davidagraf) wrote :

The merge-directive was created in a feature branch on Windows just by executing bzr send -o ... . Afterwords, the merge-directive was merged into a feature branch on a linux machine. Without any special parameter. Just 'bzr merge <merge_directive> -d <branch_directory>'.

Revision history for this message
David Graf (davidagraf) wrote :

Additionally, I can send you the crash file.

Revision history for this message
David Graf (davidagraf) wrote :

I have again some news. When I merge a merge directive from another computer (from another shared repository), I get the following error message:

bzr: ERROR: exceptions.IndexError: list index out of range

*** 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
    attaching the crash file
        /home/sausalito/.cache/crash/bzr-20100503074539-9139.crash
    and including a description of the problem.

    The crash file is plain text and you can inspect or edit it to remove
    private information.

Revision history for this message
David Graf (davidagraf) wrote :

Hello
I managed to make a workaround. It seems that 'bzr send' took a wrong SUBMIT_BRANCH. I have no clue why, because 'bzr branch' was executed in a feature branch. But after adding the link to the launchpad branch to the 'bzr send' command, I was able to merge the merge-directive afterwards.
Note: I am using the bzr send functionality for a self-implemented patch queue. Programmers of my project create feature branches of a mirror of a launchpad branch, commit into the feature branch, and execute at the an script that sends the merge-directive to the test server. But I just executed 'bzr send' in that script. That doesn't seem to be enough. Now, I execute bzr send with the path to the launchpad branch. I though, that is not necessary. But it seems to be.

Seems that I made a fault. But a better error message would be very helpful.

Revision history for this message
elferdo (elferdo) wrote :

Just for your knowledge, I reported a similar bug (#540910) which got marked as incomplete.

Jelmer Vernooij (jelmer)
tags: added: missing-inventory
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.