Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One way is to just leave merged feature branches open (and inactive):</p> <pre><code>$ hg up default $ hg merge feature-x $ hg ci -m merge $ hg heads (1 head) $ hg branches default 43:... feature-x 41:... (2 branches) $ hg branches -a default 43:... (1 branch) </code></pre> <p>Another way is to close a feature branch before merging using an extra commit:</p> <pre><code>$ hg up feature-x $ hg ci -m 'Closed branch feature-x' --close-branch $ hg up default $ hg merge feature-x $ hg ci -m merge $ hg heads (1 head) $ hg branches default 43:... (1 branch) </code></pre> <p>The first one is simpler, but it leaves an open branch. The second one leaves no open heads/branches, but it requires one more auxiliary commit. One may combine the last actual commit to the feature branch with this extra commit using <code>--close-branch</code>, but one should know in advance which commit will be the last one.</p> <p><strong>Update</strong>: Since Mercurial 1.5 you can close the branch at any time so it will not appear in both <code>hg branches</code> and <code>hg heads</code> anymore. The only thing that could possibly annoy you is that technically the revision graph will still have one more revision without childen.</p> <p><strong>Update 2</strong>: Since Mercurial 1.8 <em>bookmarks</em> have become a core feature of Mercurial. Bookmarks are more convenient for branching than named branches. See also this question:</p> <ul> <li><a href="https://stackoverflow.com/questions/1780778/mercurial-branching-and-bookmarks">Mercurial branching and bookmarks</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload