sjtai
sjtai

Reputation: 480

How to develop in multiple branches with hgflow

I'm evaluating hgflow. The model meets most of my version control needs except that I can't figure out how to support multiple releases.

Assuming I have released v1.0 a while ago, have just released v2.0 and I have been using hgflow since the beginning. A customer who is still on v1.0 requests for a feature to be implemented. Because of the stability of v1.0, he doesn't want to upgrade to v2.0 or v3.0.

Using the generalized streams concept:

If I follow the hgflow model, I may end up with a v1.1 tag created after the v2.0 tag in the master stream. Worse still, the changes in v1.1 may overwrite the various enhancements I have made between v1.0 to v2.0.

My question is: can anyone suggest a solution to my problem? Any suggestion is appreciated. Thanks.

Upvotes: 3

Views: 3428

Answers (1)

user1777782
user1777782

Reputation:

The workflow that you want to use for this situation has something to do with the support stream:

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.

All your changes to support the 1.x release are in the support/1.x branch, which by concept will normally not merge to other streams.

Upvotes: 9

Related Questions