AssertionError: recreated git commit had different sha1

Bug #537772 reported by Brian de Alwis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

I'm trying to dpush to a github branch, but was encountering bug 533407. I pulled down the latest bzr-git and dulwich, and tried again. Unfortunately I'm now running into an AssertionError:

this is a debug log for diagnosing/reporting problems in bzr
you can delete or truncate this file, or include sections in
bug reports to https://bugs.launchpad.net/bzr/+filebug

Thu 2010-03-11 19:09:02 -0500
0.047 bazaar version: 2.1.0
0.047 bzr arguments: [u'dpush', u'git+ssh://<email address hidden>/briandealwis/e4rover.git']
0.063 looking for plugins in /Users/bsd/.bazaar/plugins
0.178 looking for plugins in /usr/pkg/lib/python2.6/site-packages/bzrlib/plugins
0.196 encoding stdout as sys.stdout encoding 'UTF-8'
0.237 opening working tree '/Users/bsd/Manumitting/Projects/Robots/workspace'
0.339 bzr-svn: using Subversion 1.6.5 ()
5.741 Traceback (most recent call last):
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/foreign.py", line 351, in run
    push_result = source_branch.lossy_push(target_branch)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/branch.py", line 992, in lossy_push
    return lossy_push(stop_revision)
  File "/Users/bsd/.bazaar/plugins/git/branch.py", line 600, in lossy_push
    self.source.repository, refs)
  File "/Users/bsd/.bazaar/plugins/git/repository.py", line 92, in dfetch_refs
    return interrepo.dfetch_refs(stop_revision)
  File "/Users/bsd/.bazaar/plugins/git/push.py", line 234, in dfetch_refs
    self.source_store.generate_pack_contents)
  File "/Users/bsd/.bazaar/plugins/git/remote.py", line 281, in send_pack
    return self._transport.send_pack(get_changed_refs, generate_pack_contents)
  File "/Users/bsd/.bazaar/plugins/git/remote.py", line 135, in send_pack
    generate_pack_contents)
  File "/Users/bsd/.bazaar/plugins/dulwich/dulwich/client.py", line 329, in send_pack
    return client.send_pack(path, determine_wants, generate_pack_contents)
  File "/Users/bsd/.bazaar/plugins/dulwich/dulwich/client.py", line 96, in send_pack
    new_refs = determine_wants(old_refs)
  File "/Users/bsd/.bazaar/plugins/git/push.py", line 229, in determine_wants
    ret[name] = self.source_store._lookup_revision_sha1(revid)
  File "/Users/bsd/.bazaar/plugins/git/object_store.py", line 255, in _lookup_revision_sha1
    self._update_sha_map(revid)
  File "/Users/bsd/.bazaar/plugins/git/object_store.py", line 92, in _update_sha_map
    self._update_sha_map_revision(revid)
  File "/Users/bsd/.bazaar/plugins/git/object_store.py", line 127, in _update_sha_map_revision
    raise AssertionError("recreated git commit had different sha1: expected %s, got %s" % (foreign_revid, commit_obj.id))
AssertionError: recreated git commit had different sha1: expected 489c12e9fc3e7ef870f4812225796b3816c5b39e, got f5b14fa38f1766e37282bf94b35120db24670281

5.743 couldn't find apport bug-reporting library: No module named apport
5.758 Traceback (most recent call last):
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/plugin.py", line 471, in _get__version__
    version_string = _format_version_tuple(version_info)
  File "/usr/pkg/lib/python2.6/site-packages/bzrlib/__init__.py", line 93, in _format_version_tuple
    sub = version_info[4]
IndexError: tuple index out of range

5.759 Transferred: 0KiB (0.3K/s r:0K w:0K)
5.759 return code 4

bzr 2.1.0 on python 2.6.2 (Darwin-10.2.0-i386-32bit)
arguments: ['/usr/pkg/bin/bzr', 'dpush', 'git+ssh://<email address hidden>/briandealwis/e4rover.git']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_CA.UTF-8'
plugins:
  automv /Users/bsd/.bazaar/plugins/automv [unknown]
  bash_completion /Users/bsd/.bazaar/plugins/bash_completion [1.1.0dev]
  bzrtools /Users/bsd/.bazaar/plugins/bzrtools [2.1.0b1]
  clear_exec_bit /Users/bsd/.bazaar/plugins/clear_exec_bit.py [unknown]
  colo /Users/bsd/.bazaar/plugins/colo [0.0.3dev]
  diffstat /Users/bsd/.bazaar/plugins/diffstat [0.2.0]
  externals /Users/bsd/.bazaar/plugins/externals [1.1.0]
  extmerge /Users/bsd/.bazaar/plugins/extmerge [unknown]
  git /Users/bsd/.bazaar/plugins/git [0.4.4dev]
  launchpad /usr/pkg/lib/python2.6/site-packages/bzrlib/plugins/launchpad [2.1.0]
  mail_app /Users/bsd/.bazaar/plugins/mail_app [0.9.0]
  netrc_credential_store /usr/pkg/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.1.0]
  news_merge /usr/pkg/lib/python2.6/site-packages/bzrlib/plugins/news_merge [2.1.0]
  pipeline /Users/bsd/.bazaar/plugins/pipeline [unknown]
  rebase /Users/bsd/.bazaar/plugins/rebase [0.5.4]
  sprout /Users/bsd/.bazaar/plugins/sprout [0.9.0dev]
  svn /usr/pkg/lib/python2.6/site-packages/bzrlib/plugins/svn [1.0.2]
  xmloutput /Users/bsd/.bazaar/plugins/xmloutput [0.8.6.dev]

Revision history for this message
Brian de Alwis (slyguy) wrote :

In case it helps, I've pushed my local copy of the branch to:

    lp:~slyguy/+junk/bug-bzr-git-537772

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

Can you also publish the git branch somewhere?

Revision history for this message
Brian de Alwis (slyguy) wrote : Re: [Bug 537772] Re: AssertionError: recreated git commit had different sha1

On 11-Mar-2010, at 7:30 PM, Jelmer Vernooij wrote:
> Can you also publish the git branch somewhere?

git://github.com/briandealwis/e4rover.git
http://github.com/briandealwis/e4rover

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

Thanks, I can reproduce this.

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

The problematic commit is e5f5bb2ba3848982148f09d8d7e57e5e6deec31d

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

This is a bug caused by an earlier version of bzr-git, which would push empty directories into a git repository, something that is not supported by Git.

The directory in question is tests/org/eclipse/ebots.

I'll mark this bug closed as it will no longer occur with newer versions of bzr-git. If you need a workaround for this specific repository to get rid of the empty directories, please contact me by email.

Changed in bzr-git:
status: Triaged → Fix Released
Revision history for this message
Brian de Alwis (slyguy) wrote :

Excellent news -- thank you, Jelmer!

Brian.

On 2010-04-07, at 6:54 PM, Jelmer Vernooij <email address hidden> wrote:

> This is a bug caused by an earlier version of bzr-git, which would
> push
> empty directories into a git repository, something that is not
> supported
> by Git.
>
> The directory in question is tests/org/eclipse/ebots.
>
> I'll mark this bug closed as it will no longer occur with newer
> versions
> of bzr-git. If you need a workaround for this specific repository to
> get
> rid of the empty directories, please contact me by email.
>
> ** Changed in: bzr-git
> Status: Triaged => Fix Released
>
> --
> AssertionError: recreated git commit had different sha1
> https://bugs.launchpad.net/bugs/537772
> You received this bug notification because you are a direct subscriber
> of the bug.

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.