开发者

Mercurial - Delivering Isolated Features to Test and Live

开发者 https://www.devze.com 2023-02-16 13:28 出处:网络
We are going to swap to Mercurial. A piece in our plan that is missing is how to manage branching/merging of build to Test Box (and LiveBox) so isolated features can be mixed with the StableRelease a

We are going to swap to Mercurial. A piece in our plan that is missing is how to manage branching/merging of build to Test Box (and LiveBox) so isolated features can be mixed with the StableRelease and built to TestBox.

For instance, it seems the predominant usage is to have

  • DefaultStableBanch
    • TestBanch
      • FeatureABranch
      • FeatureBBranch

Development on FeatureA and FeatureB, will happen at the same time. It looks like predominant usage is to have cloned repositories with branches for the above.

Scenario 1 : If we build to test, we would merge LiveCode+FeatureA+FeatureB. If all goes well then we can merge the changesets to upstream to DefaultStable branch and build to LiveBox with FeatureA and FeatureB. job done.

Scenario 2 : If we build to test, we would merge LiveCode+FeatureA+FeatureB, and QA shows there is a problem with FeatureB. We do not want to build FeatureB anymor开发者_开发百科e. We do want to progress FeatureA. We want to re-test with FeatureA on it's own and let QA pass that. Then release that to Live and hence business agility.

Questions : If FeatureB fails QA , we need to take out FeatureB changeset nodes from the Test Branch, build to TesBox again and then hopefully then merge upstream to DefaultStable branch to LiveBox.

What is the best way of removing the FeatureB changeset nodes, from the TestBranch, since 1. we need more dev on FeatureB, and the FeatureB nodeset is not finsihed. 2. We need to isolate DefaultStable+FeatureABranch and build that to test

How are other people managing this ?


There are a lot of great writeups up Mercurial workflows, including:

  • http://stevelosh.com/blog/2010/02/mercurial-workflows-branch-as-needed/
  • http://stevelosh.com/blog/2010/05/mercurial-workflows-stable-default/
  • https://www.mercurial-scm.org/wiki/StandardBranching

All of those use Named Branches very minimally -- definitely not one per feature, which with clones as branches sounds like the work mode you (and I) prefer.

Hitting your specific question, if the combination LiveCode+FeatureA+FeatureB is failing tests the the best way to handle it is to just keep repairing FeatureB and then merging those changes down into FeatureA + Feature B. However, before you get to that stage it's a good idea to have QA hit LiveCode+FeatureA and LiveCode+FeatureB separately too, it's slightly more work for them (more test targets) but having each feature in isolation helps find the cause of the defect more quickly.

Once LiveCode+FeatureA and LiveCode+FeatureB are passing QA, then you merge them into LiveCode+FeatureA+FeatureB and if that still passes tests merge the whole thing into DefaultStable. There should be no need to remove FeatureB from a LiveCode+FeatureA+FeatureB because you can always just create a new clone of LiveCode and merge in only FeatureA if you want it.

Here's a great writeup of a Mercurial (Kiln) based QA/release process:

http://blog.bitquabit.com/2011/03/10/when-things-go-well/


Create FeatureA and FeatureB in feature clone branches from stable. Test is merely a temporary area for QA/Test to work from, so I would treat it as 'throwaway' from day one.

When FeatureA and FeatureB are developed enough, create a clone of either one, and pull the other into QA/Test. Do the build for QA, and when they provide feedback, make appropriate changes to FeatureB.

If FeatureA is acceptable for promotion, pull it into/push it to Stable, and merge into stable.

Is that clearer than my original post?

0

精彩评论

暂无评论...
验证码 换一张
取 消