将多头项目从 SVN 过渡到 HG
我们正在加入现代世界,并从 SVN 过渡到 Mercurial 进行源代码控制。大部分都非常简单——只需将当前主干导入 HG 并克隆即可。一个项目有点花哨,我没有看到正确的方法来做到这一点。
该项目实际上是 4 个独立的 Web 应用程序,其中 3 个实际上是单个公共线程 [称为 CORE] 的分支。从 SVN 的角度来看,它看起来像:
(root)
--CORE
--PROJECT-A
----YEAR-1
----YEAR-2
--PROJECT-B
从工作流程角度来看,对核心的更改可以来自 PROJECT-A 或 PROJECT-B,并合并回 CORE。
我的问题是“我应该如何将其放在 HG 中,并且仍然能够将更改合并到 CORE 中?
We are joining the modern world and transitioning from SVN to Mercurial for source control. Most of it is pretty straightforward -- just import the current trunk into HG and clone. One project is a bit fancier and I'm not seeing the correct way to do this.
The project in question is actually 4 separate web applications, 3 of which are effectively branches of a single common thread [called CORE]. From a SVN point of view, it looks like:
(root)
--CORE
--PROJECT-A
----YEAR-1
----YEAR-2
--PROJECT-B
Workflow-wise, changes to the core can come from either PROJECT-A or PROJECT-B and are merged back into CORE.
The question I have is "how should I put this together in HG and still be able to merge changes into the CORE?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将使用多阶段转换过程,其中每个项目都成为一个命名分支。
然后,我将使用转换扩展将您的公共代码转换为公共子存储库;你的每个项目都会有自己的“上层”仓库。
公共子存储库将为每个项目都有一个分支,并且偶尔会相互合并。
I would use a multistage conversion process, where each of those projects becomes a named branch.
Then, I would use the convert extension to munge out your common code into a common subrepo; each of your projects would get its own 'upper' repo.
The common subrepo would have a branch for each project, and occasional merges to each other.
嗯...也许 Project-A 和 Project-B 可以是 CORE 的子存储库?
https://www.mercurial-scm.org/wiki/Subrepository
Hmm... perhaps Project-A and Project-B could be subrepos of CORE?
https://www.mercurial-scm.org/wiki/Subrepository