KeyErro when pulling from github

42 views
Skip to first unread message

Dominik Ruf

unread,
May 4, 2012, 6:53:43 AM5/4/12
to hg-...@googlegroups.com
Hi,

I cloned some repositories from github which worked fine.
But as soon as I try to pull some updates I get tracebakcs like this

Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 27, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 683, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 465, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 737, in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 691, in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 680, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 139, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/root/.hgext/hgsubversion/hgsubversion/wrappers.py", line 70, in incoming
    return orig(ui, repo, origsource, **opts)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 139, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3325, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 3681, in incoming
    return hg.incoming(ui, repo, source, opts)
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 499, in incoming
    return _incoming(display, subreporecurse, ui, repo, source, opts)
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 458, in _incoming
    revs, opts["bundle"], opts["force"])
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 184, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/root/.hgext/hg-git/hggit/__init__.py", line 171, in getremotechanges
    r, c, cleanup = git.getremotechanges(other, revs)
  File "/root/.hgext/hg-git/hggit/git_handler.py", line 252, in getremotechanges
    refs = self.fetch_pack(remote.path, revs)
  File "/root/.hgext/hg-git/hggit/git_handler.py", line 821, in fetch_pack
    commit()
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/object_store.py", line 575, in commit
    return self.move_in_pack(path)
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/object_store.py", line 549, in move_in_pack
    entries = p.sorted_entries()
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/pack.py", line 1103, in sorted_entries
    ret = list(self.iterentries(progress=progress))
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/pack.py", line 1091, in iterentries
    for i, result in enumerate(PackIndexer.for_pack_data(self)):
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/pack.py", line 1238, in _walk_all_chains
    for result in self._walk_ref_chains():
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/pack.py", line 1248, in _walk_ref_chains
    self._ensure_no_pending()
  File "/usr/local/lib/python2.7/dist-packages/dulwich-0.8.4-py2.7-linux-i686.egg/dulwich/pack.py", line 1244, in _ensure_no_pending
    raise KeyError([sha_to_hex(s) for s in self._pending_ref])
KeyError: ['a47afc203838ac00bd69a74215524fdf1140d0b4', 'a773e25f80d15996b940c728da38fb7c1bc841f1', '99a6fb96e87e97d91e95dc00d1dea3ccae687919', 'bbad4a29b24430d6f2d3f330ba58bfc45d22a48a', 'f9e0552f970050a7cdbfcd1b00828f7bbc082f55', '44b3efee65af3d661470731eca07445d7c0a874f', '184e8776a0dff251d077905f05879309d53becce', '5984470c564825760c6ef47383447455ab860d4a', '9e322214d0bad0b2eb887abd3fa9e60c08047223', '2b7dbc0d4f291b2ea4ee2bad4b7d746fb7fa9c57', '38f43f4ba6a80c662d827d594650b74e945bcd0d', 'c1700bd6b70b4cc7bbf5ffd65e308dae75f396ad', 'c2256c0f757f73a225988f3200cafa86515baf3f']

Can somebody help my?

cheers Dominik

Dominik Ruf

unread,
May 8, 2012, 8:28:29 AM5/8/12
to hg-...@googlegroups.com
Really, does nobody else have this problem?
It seems to me that this is a really basic functionality.

Raffaele Salmaso

unread,
Jul 17, 2012, 12:01:32 AM7/17/12
to hg-...@googlegroups.com
On Tue, Jul 17, 2012 at 12:39 AM, Jody <jo...@trustcentric.com> wrote:
> I'm seeing this too with a fresh clone of hg-git and the latest Dulwich
> (0.8.5). It may be a bug in Dulwich. Does anyone have any ideas?

> $ hg pull git+https://github.com/fmarier/django-csp.git
$ hg pull git://github.com/fmarier/django-csp.git
should be fine
It should be a bug in git+https protocol

--
| Raffaele Salmaso
| http://salmaso.org
| https://bitbucket.org/rsalmaso
| http://gnammo.com

Dominik Ruf

unread,
Jul 17, 2012, 4:29:59 AM7/17/12
to hg-...@googlegroups.com
sadly git:// is not an option for me
I am behind a firewall that only allows port 80 and 443

thanks anyway

Am Dienstag, 17. Juli 2012 06:01:32 UTC+2 schrieb Raffaele Salmaso:

Augie Fackler

unread,
Jul 17, 2012, 1:40:09 PM7/17/12
to hg-...@googlegroups.com

On Jul 17, 2012, at 10:38 AM, Jody wrote:

> On Tuesday, July 17, 2012 12:01:32 AM UTC-4, Raffaele Salmaso wrote:
>>
>>> $ hg pull git+https://github.com/fmarier/django-csp.git
>> $ hg pull git://github.com/fmarier/django-csp.git
>> should be fine
>> It should be a bug in git+https protocol
>>
>
> Ah, this works for me. Is this a bug in hg-git or Dulwich? I'll submit a
> bug there if needed.

If it's a bug in git+https, then it's dulwich-side. I can't remember offhand if dulwich supports https now, but I think it does.

>
> Thanks,
> Jody
>
> --
> You received this message because you are subscribed to the Google Groups "hg-git" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/hg-git/-/kaMJLKe9JlcJ.
> To post to this group, send email to hg-...@googlegroups.com.
> To unsubscribe from this group, send email to hg-git+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hg-git?hl=en.
>

Jody McIntyre

unread,
Jul 17, 2012, 5:04:54 PM7/17/12
to hg-...@googlegroups.com
On Tue, Jul 17, 2012 at 1:40 PM, Augie Fackler <r...@durin42.com> wrote:
If it's a bug in git+https, then it's dulwich-side. I can't remember offhand if dulwich supports https now, but I think it does.

Yes, it does.  I can clone either repo using git+https if it's the first thing I do.  I just can't clone mozilla's repo then fmarier's (unless I use git://). 

I've logged a Dulwich bug here: https://bugs.launchpad.net/dulwich/+bug/1025886 

Cheers,
Jody
Reply all
Reply to author
Forward
0 new messages