3

我正在评估hgflow。该模型满足了我的大部分版本控制需求,只是我不知道如何支持多个版本。

假设我不久前发布了 v1.0,刚刚发布了 v2.0,而且我从一开始就一直在使用 hgflow。仍在使用 v1.0 的客户请求实现某个功能。因为v1.0的稳定性,他不想升级到v2.0或者v3.0。

使用广义流概念:

  • hg flow development start 1.x(创建开发/1.x)
  • hg flow develop/1.x:release start 1.0(从develop/1.x创建release/1.0)
  • hg flow develop/1.x:release finish(关闭 release/1.0 并在 master 上创建 v1.0)
  • 对 2.x 和 2.0 重复,因此在 v1.0 标记之后在 master 上创建 v2.0 标记
  • 收到增强 1.x 的请求
  • 汞流开发/1.x
  • 加强工作
  • hg flow develop/1.x:release start 1.1(从develop/1.x创建release/1.1)
  • hg flow develop/1.x:release finish <--- v1.1 标签是在 master 上的 v2.0 标签之后创建的

如果我遵循 hgflow 模型,我最终可能会在主流中的 v2.0 标记之后创建一个 v1.1 标记。更糟糕的是,v1.1 中的更改可能会覆盖我在 v1.0 到 v2.0 之间所做的各种增强。

我的问题是:任何人都可以建议我的问题的解决方案吗?任何建议表示赞赏。谢谢。

4

1 回答 1

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 分支中,从概念上讲,它通常不会合并到其他流中。

于 2012-12-24T23:28:24.733 回答