Mercurial supports various types of subrepositories : Mercurial, Subversion, and Git. So you can create a .hgsub file with
utils/external/firepython = [git]git://github.com/darwin/firepython.git utils/external/textile = [git]git://github.com/jsamsa/python-textile.git
and this will tell Mercurial to clone your Git repositories when cloning Mercurial. You need to first make Git clones or copy them from another location to disk:
$ git clone git://github.com/darwin/firepython.git utils/external/firepython $ git clone git://github.com/jsamsa/python-textile.git utils/external/textile $ hg add .hgsub $ hg commit -m 'Added Git subrepositories'
You will then notice that Mercurial has added the .hgsubstate file to your repository, where it stores information about the Git sub-repositories. This file is required for Mercurial to know which revision will exit your subitems when creating a new Mercurial clone.
My colleague wrote a subrepository guide that may be useful to you.
Martin Geisler Apr 10 2018-11-11T00: 00Z
source share