1

It looks like "hg convert" does not support git submodules at this time.

I'd like to create a private fork of a git repository, make a bunch of changes, and contribute them back. I prefer working with Mercurial on a daily basis which is why I'm trying to convert the repository first. Can anyone think of a workaround I can use to get around this unsupported feature?

Gili
  • 86,244
  • 97
  • 390
  • 689
  • What features do you prefer about Mercurial? This sounds complex, so I'd say it may be simpler to just take the time to learn how to do whatever you need in git. – Matt Gibson Jul 05 '12 at 15:16
  • 1
    @MattGibson, it's purely a subjective thing. I find Mercurial easier to use than Git. – Gili Jul 05 '12 at 15:40

1 Answers1

0

Mercurial supports git submodules, so you could just convert the "parent" repository and keep the kids/dependents as git. If that doesn't remove enough git from your live you could use hg convert to convert each of the sub modules separately, then the parent, and then link them as Mercurial subrepositories. The changes to the subrepositories tracked in the parent would probably be lost in that process, but you'd lose no actual file change history.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • 1
    Sounds good, but how can I `hg convert` the parent? The plugin aborts with "git submodules are not supported!" – Gili Jul 07 '12 at 17:39
  • Hrm, I'm not sure. If it's possible perhaps it requires using `--filemap` to `exclude` those directories from the initial convert? – Ry4an Brase Jul 09 '12 at 12:36
  • Unfortunately this does not work. The process aborts while iterating files in the git version, way before filemap or splicemap is looked at. – Gili Jul 09 '12 at 13:48