-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support mercurial subrepositories #1
Comments
That seems tricky to do, esp. if you want it to work bidirectional. Thing is, git-remote-hg only converts commits and the data contained in them. The actual "checkout" (i.e. the operation which takes a commit ref, extracts a tree ref from it, then updates the working tree to match the files present in that tree) is completely out of our control. So, I think one would have to patch git itself to parse and handle the .hgsub and .hgsubstate files. That seems overkill. A somewhat simpler solution would be to add some shell scripts which parse .hgsub and .hgsubstate and create / update the required clones for the user. This way, at least pulling from a hg repo works. Pushing seems even harder, though: "hg commit" tracks changes in the hg subrepositories, but of course "git commit" does not (unless we'd patch it to do that...). Of course one could also add helper scripts to handle the commit for you, and modify the .hgsub and .hgsubstate stuff... But at that point it might be easier to just work with hg directly? Anyway, this seems to be a bit beyond the scope of a remote helper -- but that's just my two cents :-). Finally, one might think about mapping hg sub repos to git submodules, but AFAIK, the latter only support adding other git repositories as submodules, not hg and SVN repos. Plus, the semantics of the two are sufficiently different to make this a potential nightmare. Overall I think such a mapping would be a bad idea, but again, that's just my two cents. |
Fair enough. In the meantime I've work around any need I had for this. |
@nathanpalmer is your work around anything worth sharing? |
As mentioned above, there is probably no reasonable and sane one-to-one native mapping between subrepos and submodules. But some helper script(s) that manage And in fact, the above commit adds such subrepo management support to a (python) helper script (that handles some things that are beyond the scope of a remote helper). |
Any plans to support mercurial subrepositories via .hgsub? I just checked out a repository with them and noticed they weren't pulled.
The text was updated successfully, but these errors were encountered: