Support submodule-subrepo mappings

Create issue
Issue #222 open
Zoltán Lehóczky created an issue

Currently git submodules are transformed into git subrepos when syncing from git to hg; the other way around subrepos are just discarded. I propose an improved way of handling submodules/repos if those repos also have git/hg mirrors.

There could be an optional config enable this behaviour and to map git submodule URLs to hg subrepo URLs. Then the following would happen, starting with the hg side for example:

  1. We have hg repo with hg subrepos.
  2. Gexport not only converts the super repo to git, but also the subrepos and stores them internally together with the super repo's git representation. The latter's .submodules config references the git URLs (remember we configured where the git mirrors of our hg subrepos are) and internally the changesets of the submodules correspond to the hg subrepos' commits (using their converted versions too).
  3. If a commit is added to a subrepo and then to the super repo then both are again exported to git.

The same happens from git too, the other way around.

We run Git-hg Mirror and it would simplify things greatly if composed repos could also be easily synced. Now you have to keep submodules only (and even use those from hg) due to the lack of suitable bridging.

What do you think?

Comments (3)

  1. Enrique Garcia

    What’s the current status of this?

    I’m in the process of migrating a repo with sub repositories to git, but at the moment sub repositories are ignored.

  2. Log in to comment