Subsequent pulls fail with "invalid sha" assertion

Bug #380237 reported by Chris Halse Rogers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

Bzr version 1.14, bzr git r530, dulwitch r390.

I've got a bzr branch of git://git.gnome.org/banshee. The initial branch works fine, and generates a perfectly usable bzr branch. All subsequent pulls, however, raise sha exceptions like the one below:

└─(21:02:%)── bzr pull ──(Mon,May25)─┘
Using saved parent location: git://git.gnome.org/banshee
bzr: ERROR: exceptions.AssertionError: Invalid sha for <Tree d67458fc0c2927359848904e0525ee2a301bf77b>: 71e52f165ad66aeddc4f07ad5a386182c93e646f

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 940, in run
    possible_transports=possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 1573, in pull
    possible_transports=possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2253, in pull
    _override_hook_target=_override_hook_target)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2078, in pull
    graph=graph)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 776, in update_revisions
    overwrite, graph)
  File "/home/raof/.bazaar/plugins/git/branch.py", line 356, in update_revisions
    interrepo.fetch_objects(determine_wants, self.source.mapping)
  File "/home/raof/.bazaar/plugins/git/fetch.py", line 406, in fetch_objects
    store, recorded_wants, pb)
  File "/home/raof/.bazaar/plugins/git/fetch.py", line 309, in import_git_objects
    parent_invs, target_git_object_retriever._idmap, lookup_object)
  File "/home/raof/.bazaar/plugins/git/fetch.py", line 215, in import_git_tree
    revision_id, parent_invs, shagitmap, lookup_object)
  File "/home/raof/.bazaar/plugins/git/fetch.py", line 207, in import_git_tree
    tree = lookup_object(hexsha)
  File "/home/raof/.bazaar/plugins/git/fetch.py", line 253, in lookup_object
    return target_git_object_retriever[sha]
  File "/home/raof/.bazaar/plugins/git/object_store.py", line 234, in __getitem__
    expected_sha=sha)
  File "/home/raof/.bazaar/plugins/git/object_store.py", line 165, in _get_tree
    self._check_expected_sha(expected_sha, tree)
  File "/home/raof/.bazaar/plugins/git/object_store.py", line 116, in _check_expected_sha
    raise AssertionError("Invalid sha for %r: %s" % (object, expected_sha))
AssertionError: Invalid sha for <Tree d67458fc0c2927359848904e0525ee2a301bf77b>: 71e52f165ad66aeddc4f07ad5a386182c93e646f

bzr 1.14 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'pull']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.UTF-8'
plugins:
  bisect /home/raof/.bazaar/plugins/bisect [1.1.0.pre.0]
  builddeb /usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb [unknown]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.14]
  git /home/raof/.bazaar/plugins/git [0.3.3dev]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [unknown]
*** 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.

This behaviour does not occur when there are no new revisions to pull. This behaviour is independent of whether or not the branch is in a repository or not. Repository info:

└─(21:28:%)── bzr info -vvv ──(Mon,May25)─┘
Repository tree (format: unnamed)
Location:
  shared repository: /home/raof/Devel/Banshee/new-repo-test
  repository branch: .

Related branches:
  parent branch: git://git.gnome.org/banshee

Format:
       control: Meta directory format 1
  working tree: Working tree format 4
        branch: Branch format 6
    repository: Packs 6 rich-root (uses btree indexes, requires bzr 1.9)

In the working tree:
      2917 unchanged
         0 modified
         0 added
         0 removed
         0 renamed
       288 unknown
        16 ignored
       440 versioned subdirectories

Branch history:
      4554 revisions
       118 committers
      1434 days old
   first revision: Mon 2005-06-20 18:30:50 +0000
  latest revision: Thu 2009-05-21 18:56:40 -0500

Repository:
      4559 revisions

Revision history for this message
Julien Lavergne (gilir) wrote :

I can confirm this with conduit git tree on git.gnome.org

bzr 1.15, bzr-git and dulwitch 0.3.2

Jelmer Vernooij (jelmer)
Changed in bzr-git:
assignee: nobody → Jelmer Vernooij (jelmer)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in trunk

Changed in bzr-git:
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

Remote bug watches

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