git-hg icon indicating copy to clipboard operation
git-hg copied to clipboard

Error: repository has at least one unnamed head

Open nschloe opened this issue 9 years ago • 3 comments

When hg-cloning Octave, everything goes fine:

$ hg clone http://www.octave.org/hg/octave upstream
real URL is http://hg.savannah.gnu.org/hgweb/octave
requesting all changes
adding changesets
adding manifests
adding file changes
added 19535 changesets with 116074 changes to 12685 files (+1 heads)
updating to bookmark @
real URL is http://hg.savannah.gnu.org/hgweb/octave/gnulib-hg
cloning subrepo gnulib-hg from http://www.octave.org/hg/octave/gnulib-hg
requesting all changes
adding changesets
adding manifests
adding file changes
added 17763 changesets with 95689 changes to 11138 files (+13 heads)
3114 files updated, 0 files merged, 0 files removed, 0 files unresolved

so it seems the remote repo is intact. git-hg however fails with

$ git-hg clone http://www.octave.org/hg/octave
Initialized empty Git repository in /home/nschloe/software/octave/octave/.git/
real URL is http://hg.savannah.gnu.org/hgweb/octave
requesting all changes
adding changesets
adding manifests
adding file changes
added 19535 changesets with 116074 changes to 12685 files (+1 heads)
Initialized empty Git repository in /home/nschloe/software/octave/octave/.git/hgremote/
Error: repository has at least one unnamed head: hg r15563
fatal: Couldn't find remote ref gui-release
fatal: The remote end hung up unexpectedly

nschloe avatar Jan 05 '15 14:01 nschloe

I just ran into the same error today. I might dive into it later because we use hg at work and using hg itself is starting to drive me crazy. Even if I can't figure out how to patch the issue, I'll at least change the error reporting to use the commit hash instead of the revision number... (or try to, anyway)

dan-passaro avatar Jun 10 '15 14:06 dan-passaro

Just ran into this same issue with the Hugin repository;

$ git hg clone http://hg.code.sf.net/p/hugin/hugin hugin-hugin
Error: repository has at least one unnamed head

ndevenish avatar Jun 08 '16 22:06 ndevenish

However, I just discovered that git-hg actually supports fast-exports --force flag, so this works:

$ git hg clone --force http://hg.code.sf.net/p/hugin/hugin hugin-hugin

ndevenish avatar Jun 08 '16 22:06 ndevenish