schacon/hg-git — Issue #234: KeyError on push
Author: boris-unterer
Created: 2011-10-21 18:44:01+00:00
State: open

Hi
I've got this excpetion with hg-git bd233a168251 and dulwich 0.8.0 (both the latest versions of today).
any idea?

** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) [GCC 4.3.4 20090804 (release) 1]
** Mercurial Distributed SCM (version 1.9.2)
** Extensions loaded: hgsubversion, hggit, convert, children, churn, color, extdiff, fetch, gpg, mq, graphlog,
keyword, purge, rebase, record, transplant, hgk, share
Traceback (most recent call last):
File "/usr/bin/hg", line 38, in
mercurial.dispatch.run()
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 27, in run
sys.exit(dispatch(request(sys.argv[1:])))
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 64, in dispatch
return _runcatch(req)
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 87, in _runcatch
return _dispatch(req)
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 688, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 463, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.6/site-packages/mercurial/extensions.py", line 182, in wrap
return wrapper(origfn, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/hgext/color.py", line 368, in colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 742, in _runcommand
return checkargs()
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 696, in checkargs
return cmdfunc()
File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 685, in
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/extensions.py", line 137, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/home/Administrator/hgsubversion/hgsubversion/wrappers.py", line 524, in generic
return orig(ui, repo, *args, **opts)
File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/extensions.py", line 137, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/hgext/mq.py", line 3218, in mqcommand
return orig(ui, repo, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/mercurial/commands.py", line 3886, in push
newbranch=opts.get('new_branch'))
File "/home/Administrator/hg-git.git/hggit/hgrepo.py", line 22, in push
git.push(remote.path, revs, force)
File "/home/Administrator/hg-git.git/hggit/git_handler.py", line 227, in push
changed_refs = self.upload_pack(remote, revs, force)
File "/home/Administrator/hg-git.git/hggit/git_handler.py", line 701, in upload_pack
changed_refs = client.send_pack(path, changed, genpack)
File "/usr/lib/python2.6/site-packages/dulwich/client.py", line 187, in send_pack
entries, sha = write_pack_objects(proto.write_file(), objects)
File "/usr/lib/python2.6/site-packages/dulwich/pack.py", line 1504, in write_pack_objects
num_objects = len(objects)
File "/usr/lib/python2.6/site-packages/dulwich/object_store.py", line 674, in __len__
return len(list(self.itershas()))
File "/usr/lib/python2.6/site-packages/dulwich/object_store.py", line 648, in itershas
for sha in self.sha_iter:
File "/usr/lib/python2.6/site-packages/dulwich/object_store.py", line 741, in next
o = self.object_store[sha]
File "/usr/lib/python2.6/site-packages/dulwich/object_store.py", line 112, in __getitem__
type_num, uncomp = self.get_raw(sha)
File "/usr/lib/python2.6/site-packages/dulwich/object_store.py", line 313, in get_raw
raise KeyError(hexsha)
KeyError: 'd2040defc9d53602a6fee9d266e6216c38850b56'