title: Going between development & production in Mercurial
body: <p>I've used mercurial for some time now, but haven't really gotten used to working with branches, so I am struggling to figure out whether this workflow makes sense or not before applying it to a real project.</p>
  
  <p><strong>The question:</strong><br>
  Does it really make sense to resurrect a <code>development</code> branch every time we're going to work on a new release by merging <code>production</code> into it, or should we instead make unique named short-lived development branches like <code>development-1.1</code>?</p>
  
  <p><strong>Description of workflow:</strong><br>
  Every production-ready revision of our code will be tagged (<code>1.0</code>,<code>1.1</code> and so on) and placed in the <code>production</code> branch. As soon as we've put <code>1.0</code> into production, we immediately start working on next release - <code>1.1</code>, by opening a branch named <code>development</code>, which is then sub-branched by every developer for every assigned feature to keep things neat. Very straightforward this far.</p>
  
  <p>The <code>development</code> branch, now containing the in-merged <code>feature</code> branch, is then tested and merged back into <code>production</code> as the changes have been considered production-ready. </p>
  
  <p>When when we need to continue working on an upcoming release, <code>1.2</code> in this example, we merge the <code>production</code>-branch into the <code>development</code> one and start working. </p>
  
  <p><strong>Illustrated history of the revisions:</strong></p>
  
  <pre><code>@    changeset:   8:21e89b501d4e
  |\   branch:      development
  | |  tag:         tip
  | |  description: Development stage for v1.2 opened by merging production into development.
  | |
  | o  changeset:   7:920ca77aa956
  |/|  branch:      production
  | |  tag:         1.1
  | |  description: Version 1.1 stable (merged from development).
  | |
  o |    changeset:   6:691b7aa99e42
  |\ \   branch:      development
  | | |  description: Feature merged in to development
  | | |
  | o |  changeset:     5:5156cb9cf556
  | | |  branch:        feature
  | | |  description:   Feature finished
  | | |
  | o |  changeset:     4:0345dc73e144
  |/ /   branch:        feature
  | |    description:   Work started on a feature
  | |
  o |  changeset:    3:9d49be5d8a03
  |/   branch:       development
  |    description:  Development branch opened
  |
  o  changeset:     2:ba818420fa88
  |  branch:        production
  |  tag:           1.0
  |  description:   Version 1.0 stable. Woop woop!
  </code></pre>