I been happily using submodules to track all the libraries my project depends from.
The thing is I’m using a library called core-plot that only has a public mercurial repository.
I can probably mirror it in a readonly Git repository, but is this the best option I got?
I had seen there is modules in Mercurial to track things in Git. Someone know if the other way around exists?
I been happily using submodules to track all the libraries my project depends from.
Share
Using git-hg.
First, make sure there is a (non-Mercurial) git submodule under your main repository. If you don’t have other submodules yet, just create a dummy submodule for some library other than
core-plot, for instance:Second, clone the
core-plotlibrary into some directory.Add the new repo to the submodule list.
From now on, any clone from this repo will pull both repositories. (After submodule init and update).
Some problems I found out so far are:
git-hgwill have togit-hg pull.The converse question git submodule from Hg repo? is also asked on StackOverflow. The best answer mentions projects hg-git and git-hg. Another related converse question is, How to deal with Git submodules on a repo that is converted to Mercurial.