如何组织和维护 Mercurial 存储库
目前,我有 5 个不同品牌的产品,它们具有几乎相同的代码库(差异与品牌相关),并且所有这些产品都位于独立的 Mercurial 分支中。
错误修复和开发是在 default
分支中完成的,所有更改都通过 hg port
命令移植到分支。这种方法是有效的,但品牌数量可能会增加,需要更长的时间才能使所有分支机构保持最新状态。
我想知道是否有其他/更简单的方法来完成这项任务。
At the moment I have 5 differently branded products with almost the same codebase (the differences are brand related) and all those products live in the separated mercurial branches.
Bug fixing and development is done in the default
branch and all changes are transplanted to the branches with hg transplant
command. This approach is working but number of the brands might be increased it'll take longer to keep all branches in up to date state.
I'm wondering if there is any other/easier way for this task.
在这种情况下使用
transplant
听起来有点过头了。您应该简单地在default
分支中进行错误修复更改,并使用hg pull
(在品牌存储库上)并合并所有品牌存储库上的更改。transplant
被添加到 Mercurial 中,以允许挑选变更集,这些变更集需要特殊情况才能在变更集的正常流程中向后移动(即在 fork/ 中引入的单个变更)分支需要拼接到原仓库)Using
transplant
in this case sounds like overkill. You should simply be making the bugfix changes in thedefault
branch and usehg pull
(on the branded repositories) and merge the changes on all of the branded repositories.transplant
was added to Mercurial to allow for cherry-picking changesets that needed a special case to go backward in the normal flow of changesets (i.e. a single change introduced in the fork/branch needs to be spliced into the original repository)