AssertionError: Invalid sha for <Tree

Bug #933132 reported by jugglefish
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

git fetch bzr::/opt/openerp-bzr-WIP/addons/trunk
Traceback (most recent call last):
  File "/usr/lib/git-core/git-remote-bzr", line 49, in <module>
    helper.process(sys.stdin, sys.stdout)
  File "/home/pn/.bazaar/plugins/git/git_remote_helper.py", line 168, in process
    self.process_line(l, outf)
  File "/home/pn/.bazaar/plugins/git/git_remote_helper.py", line 184, in process_line
    self.commands[argv[0]](self, outf, argv)
  File "/home/pn/.bazaar/plugins/git/git_remote_helper.py", line 120, in cmd_list
    for ref, git_sha1 in refs.as_dict().iteritems():
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-x86_64.egg/dulwich/repo.py", line 202, in as_dict
    ret[key] = self[("%s/%s" % (base, key)).strip("/")]
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-x86_64.egg/dulwich/repo.py", line 273, in __getitem__
    _, sha = self._follow(name)
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-x86_64.egg/dulwich/repo.py", line 255, in _follow
    contents = self.read_ref(refname)
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-x86_64.egg/dulwich/repo.py", line 231, in read_ref
    contents = self.read_loose_ref(refname)
  File "/home/pn/.bazaar/plugins/git/refs.py", line 134, in read_loose_ref
    return self.object_store._lookup_revision_sha1(revid)
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 577, in _lookup_revision_sha1
    self._update_sha_map(revid)
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 380, in _update_sha_map
    self._update_sha_map_revision(revid)
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 480, in _update_sha_map_revision
    for path, obj, ie in self._revision_to_objects(rev, tree, lossy=(not self.mapping.roundtripping)):
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 447, in _revision_to_objects
    root_tree = self[self[base_sha1].tree]
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 689, in __getitem__
    tree, unusual_modes, expected_sha=sha)
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 556, in _reconstruct_tree
    _check_expected_sha(expected_sha, tree)
  File "/home/pn/.bazaar/plugins/git/object_store.py", line 152, in _check_expected_sha
    expected_sha))
AssertionError: Invalid sha for <Tree f8f17b072c38b81f59e4927a8db577f27894ff38>: 37ae10089dcdf21052b41f3619467d4a886f6504

Related branches

Revision history for this message
jugglefish (pniederlag) wrote :

git-bzr and dulwich fresh trunk install

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

Please paste the output of "git cat-file -p 37ae10089dcdf21052b41f3619467d4a886f6504"

Changed in bzr-git:
status: New → Incomplete
Revision history for this message
jugglefish (pniederlag) wrote : Re: [Bug 933132] Re: AssertionError: Invalid sha for <Tree

Hello Jelmer,

If am not mistaken a commit which just consists of adding an empty
directory triggers the problem. I attached output below.

On 15.02.2012 23:47, Jelmer Vernooij wrote:
> Please paste the output of "git cat-file -p
> 37ae10089dcdf21052b41f3619467d4a886f6504"

git cat-file -p 37ae10089dcdf21052b41f3619467d4a886f6504
error: unable to find 37ae10089dcdf21052b41f3619467d4a886f6504
fatal: Not a valid object name 37ae10089dcdf21052b41f3619467d4a886f6504

git fsck
broken link from tree a28476d09d37f1d43ca4a5b4d1cab4fd3d8b3f53
              to tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
missing tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904

Greets,
Peter

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

On Wed, Feb 15, 2012 at 11:33:56PM -0000, jugglefish wrote:
> If am not mistaken a commit which just consists of adding an empty
> directory triggers the problem. I attached output below.
>
> On 15.02.2012 23:47, Jelmer Vernooij wrote:
> > Please paste the output of "git cat-file -p
> > 37ae10089dcdf21052b41f3619467d4a886f6504"
>
> git cat-file -p 37ae10089dcdf21052b41f3619467d4a886f6504
> error: unable to find 37ae10089dcdf21052b41f3619467d4a886f6504
> fatal: Not a valid object name 37ae10089dcdf21052b41f3619467d4a886f6504
>
> git fsck
> broken link from tree a28476d09d37f1d43ca4a5b4d1cab4fd3d8b3f53
> to tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
> missing tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
I think this should be fixed in current trunk. Can you try with that?

You will probably have to remove the .bzr/git directory before doing
this.

Cheers,

Jelmer

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

Optimistically marking as fixed.

  status fixcommitted

Changed in bzr-git:
status: Incomplete → Fix Committed
Revision history for this message
jugglefish (pniederlag) wrote :

I can confirm it is working now. Thx for fixing!

Jelmer Vernooij (jelmer)
Changed in bzr-git:
assignee: nobody → Jelmer Vernooij (jelmer)
importance: Undecided → Medium
milestone: none → 0.6.8
Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: Fix Committed → 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.