Closed slinkp closed 13 years ago
I just tried again with hg-git tip cloned from http://bitbucket.org/Scotty/hg-git/as of revision 177:88fdcb23294e ... same problem.
I should have mentioned some version info: hg 1.1.2 python 2.6.2 ubuntu 9.04
I'm also seeing this on my local install with Dulwich 0.4.0 and hg 1.3.
durin42, did you use some tool to import your git repository from a foreign scm? I've done some checking, and it looks like the problem is from dulwich not supporting empty commits...
I have no idea - this isn't my repository. I'll file an issue with dulwich about empty commits. Thanks.
I get this same error even though I don't have any empty commits in my repository.
Been talking to the dulwich maintainer on launchpad and they believe this is a problem with how hg-git retrieves submodules:
https://bugs.launchpad.net/dulwich/+bug/480409/comments/6
For testing, here is a simple repository (2 files / 13 commits) also causing the traceback:
git://github.com/dydx/Project.git
I found it just by cloning random repos from github. Here are some more:
git://github.com/wildabeast/phonegap-symbian.qt.git git://github.com/pietern/jspec-async.git git://github.com/tarcisio/pesquisa_vagas.git
I too have seen this error a few times...
Here are a few more examples: git://github.com/rentzsch/mogenerator.git git://github.com/ccgus/jstalk.git git://github.com/Caged/gitnub.git
Mercurial 1.4.2 dulwich 0.4.1 hg-git directly from repo as of January 24th.
Unfortunately, this didn't fix any of the repos I tried. :-(
So it seems the problem is indeed with git repositories that contain submodules.
For example the 9th commit in github.com/dydx/Project introduces a submodule. Cloning it with hg-git up to that commit (first git clone it, then git reset --hard HEAD~5, and manually remove the refs in .git/packed-refs referring to origin) works fine.
Since hg-git doesn't support git submodules, all I could think of for now was to catch the KeyError, and print a nicer abort message.
Alright, I have patched hg-git (cc0b7fa90d46beb2d0fc21d5d9b7ea9076fbb7d7) to not import submodules. It was reviewed by one of the mercurial crew devs and is being looked at now by durin42. It's a small change. Feel free to pull and grab those repos that were giving you problems.
Works for me now, thanks!
Fixed.
I have installed the plugin snapshot schacon-hg-git-58dfc84ba193946730524845bb12f76b8ed87375.zip. It works for cloning some things, eg. I successfully cloned git://github.com/schacon/hg-git.git
But if I attempt to clone git://github.com/iwillig/fixcity.git I get this exception: