Hg 存储库中的 git 子模块?
我有一个非常旧的项目,其中直接包含另一个项目的源代码,而不是将其链接为库。 回到糟糕的日子,当我将所有内容都保存在 CVS 中时,我将外部代码放在供应商分支上并定期导入。 现在我的项目位于 git 中,将外部项目作为子模块包含进来会更有意义。 但是,有一个问题:外部项目已迁移到 Mercurial。 我找到了 git-hg 和 hg-git 项目,但我不确定其中任何一个是否可以正确处理子模块。
有没有办法创建一个指向 Hg 存储库而不是 git 存储库的 git 子模块?
I have a very old project that includes the source from another project directly, instead of linking it as a library. Back in the bad days, when I was keeping everything in CVS, I had the external code on a vendor branch and did periodic imports. Now that my project is in git it would make more sense to include the external project as a submodule. But, there's a problem: the external project has migrated to Mercurial. I've found the git-hg and hg-git projects, but I'm not sure if either one handles submodules properly.
Is there a way to create a git submodule that points to an Hg repo instead of a git repo?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 hg-git 确实提到尚不支持子模块,所以剩下只有手动选项:
hg gpush
。例如:
该 Git 存储库将代表您的子模块,但如果您修改并推送该子模块,您仍然需要从该 Git 存储库拉取到实际的 Hg 存储库。
其他很棒的 git-hg 命令列在这个“罗塞塔石碑”。
Since the hg-git does mention that submodules are not supported yet, that leaves only a manual option:
hg gpush
from within your project.For example:
That Git repo will represent your submodule, but if you modify and push that submodule, you will still have to pull from that Git repo to the actual Hg repo.
Other great git-hg commands are listed in this "rosetta stone".