Transitioning Multi-Headed Projects from SVN to HG
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开发者_如何学Python 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?
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.
Hmm... perhaps Project-A and Project-B could be subrepos of CORE?
https://www.mercurial-scm.org/wiki/Subrepository
精彩评论