Converting from git loses branch names

Greg Ward gerg.ward+hg at gmail.com
Tue Dec 2 14:07:06 CST 2008


I am trying to convert a git repository with several named branches.
"hg convert" seems to convert all the changesets and preserve the
branch/merge history.  But it loses the branch names: all of my git
branches disappear and become unnamed Mercurial heads on branch
"default".  (Hope I've got my terminology right there!)

To make it concrete: I first made a local clone of my git repo.  In
that clone:

  $ git rev-list --all | wc -l
  96

  $ git branch
  [...17 branches including "master"...]

Thus I expect 96 changesets and 17 branches (including "default") in
my Mercurial conversion.

After "hg convert"ing that clone, I get

  $ hg log --template "{node}\n"| wc -l
  97         # extra changeset for converting tags

  $ hg branches
  default                       96:f0ce268bb09c

See... no branches!

Is this a known problem?  Or perhaps a confusing feature?  Google'ing
didn't turn up much except someone else noticing the same problem
converting a git repo of KDE to hg:

  http://mail.kde.org/pipermail/kde-scm-interest/2008-February/000160.html

Thanks --

       Greg


More information about the Mercurial mailing list