我正在评估hgflow。该模型满足了我的大部分版本控制需求,但我无法弄清楚如何支持多个版本。
假设我刚刚发布了v1.0,刚刚发布了v2.0,我从一开始就一直在使用hgflow。仍在v1.0上的客户请求实现某项功能。由于v1.0的稳定性,他不想升级到v2.0或v3.0。
使用广义流概念:
如果我遵循hgflow模型,我最终可能会在主流中的v2.0标记之后创建一个v1.1标记。更糟糕的是,v1.1中的更改可能会覆盖我在v1.0到v2.0之间所做的各种增强。
我的问题是:有人能建议解决我的问题吗?任何建议表示赞赏。感谢。
答案 0 :(得分:9)
您希望在此情况下使用的工作流程与支持流有关:
hg flow master # Update the workspace dir to the master branch.
hg flow support start 1.x -r v1.0 # Create a support/1.x branch from v1.0 snapshot.
hg flow support/1.x start feature1 # Create a support/1.x/feature1 branch.
... # Commits to implement feature1
hg flow support/1.x finish # Finish feature1. Changes in support/1.x/feature1 will be merged into the support/1.x branch.
hg tag v1.1 # Create support releases in the support/1.x branch.
支持1.x版本的所有更改都在support / 1.x分支中,概念通常不会合并到其他流。