Comments (4)
(Disclaimer: I am not the author of this code, just somebody who tries to help. Take everything I say with a grain of salt)
Hm, looking at the mercurial source code, the + after the sha1 indicates that head in that case is either a workingctx or a memctx. My guess is on the former, but to be sure, could you add log(repr(head))
?
Also, your repo has 1797 commits -- I wonder if 10cf14cad52b is the tip commit, resp. commit 1797?
Overall, one guess would be that the tip or working dir or so of the repository you are cloning in is not "clean". E.g. my very first idea was that perhaps there is an incomplete merge going on there (i.e. somebody forgot to "hg commit" after doing "hg merge"). But in a quick test, I couldn't replicate your error this way, though perhaps I just did not try hard enough. But perhaps you can inspect your hg repo a bit closer to see if that is the case?
from git.
Perhaps you can try this:
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -297,7 +297,7 @@ def export_ref(repo, name, kind, head):
tip = marks.get_tip(ename)
# mercurial takes too much time checking this
- if tip and tip == head.rev():
+ if tip and tip == head.rev() or not head.rev():
# nothing to do
return
revs = xrange(tip, head.rev() + 1)
from git.
Also, you should probably log the name of the branch as well, so that you can check which is the desired tip of that branch.
from git.
I found the culprit, this script reproduces the issue:
(
hg init hgrepo &&
cd hgrepo &&
echo one >> content &&
hg add content &&
hg commit -m one &&
hg branch "foo bar" &&
echo two >> content &&
hg commit -m two &&
hg update default
) &&
git clone "hg::$PWD/hgrepo" gitrepo
So yeah, it was the working directory, because repo[None] returns that, and because the branch "foo" couldn't be found, and so the tip was determined to be None.
But it's already fixed:
82dec9b
from git.
Related Issues (20)
- Something is wrong with git-stage docs HOT 2
- Crash during push to Hg repo HOT 2
- planet bzr repos cannot be cloned HOT 6
- push failed when git branch is different than bzr branch name HOT 2
- Trying to Parse email as int. HOT 1
- Push to new launchpad branch using git-remote-bzr HOT 4
- Fatal error thrown by felipec-git on fast-import of Hg assets HOT 13
- bzrlib.errors.NoSuchFile error while cloning openobject-addons on Launchpad HOT 1
- Cannot push when using https authentication with git-remote-hg HOT 5
- git-remote-hg mysteriously fails HOT 2
- Cloning hg repo from Octave project crashes fast-import HOT 5
- rebase or merge latest git release HOT 2
- Git commits show up in the "draft" phase in BitBucket HOT 2
- Closed branches can cause synchronization issues after gc
- Link to git-remote-hg.py in the wiki is wrong HOT 2
- Worked for a while, now fetch fails with "mark not declared"
- Sorry, flubbed an enter key press... please delete.
- git-remote-hg doesn't fetch HOT 2
- Bookmarks on named branches HOT 1
- uses obsolete python2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.