<p>We're using Mercurial where I work and I want to have a setup similar to how I used SVN:</p>

<ul>
<li>Trunk</li>
<li>Tags

<ul>
<li>Production</li>
</ul></li>
<li>Branches</li>
</ul>

<p>Since Mercurial supports branches natively, I know how to create a named branch, but I can't find any documentation on how to repeatedly merge 'Trunk' with 'Production'. </p>

<p>Quite simply, I want to have a development branch for normal work and a production branch that I routinely pull changes from the development branch into. How do I do this with Mercurial?</p>

[{'answer_id': 50239, 'author': 'nlucaroni', 'author_id': 157, 'author_profile': 'https://Stackoverflow.com/users/157', 'pm_score': 2, 'selected': False, 'text': '<p>Something like <a href="http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension" rel="nofollow noreferrer"><code>hg transplant</code></a>? That\'s what we use on our dev and prod branches.</p>\n'}, {'answer_id': 50475, 'author': 'Erin Dees', 'author_id': 3462, 'author_profile': 'https://Stackoverflow.com/users/3462', 'pm_score': 5, 'selected': True, 'text': '<p>As the previous poster mentioned, the transplant extension can be used for cherry-picking individual changes from one branch to another.  If, however, you always want to pull <em>all</em> the latest changes, the <code>hg merge</code> command will get you there.</p>\n\n<p>The simplest case is when you\'re using clones to implement branching (since that\'s the use case Mercurial is designed around).  Assuming you\'ve turned on the built-in <a href="http://www.selenic.com/mercurial/wiki/index.cgi/FetchExtension" rel="noreferrer">fetch</a> extension in your <code>.hgrc</code> / <code>Mercurial.ini</code>:</p>\n\n<pre><code>cd ~/src/development\n# hack hack hack\nhg commit -m "Made some changes"\ncd ../production\nhg fetch ../development\n</code></pre>\n\n<p>If you\'re using local branches:</p>\n\n<pre><code>hg update -C development\n# hack hack hack\nhg commit -m "Made some changes"\nhg update -C production\nhg merge development\nhg commit -m "Merged from development"\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/50223', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/956/']