title: How to abort an Hg merge without losing working copy changes?
body: <p>Last night I started a merge; and forgot to commit it.</p>
  
  <p>Later on I made some changes to the working copy.</p>
  
  <p>Today I no longer want that merge at all (as I'll merge on a newer revision), but I want to keep the local working changes. The changes are independent of any merge resolution.</p>
  
  <p><em>How can the local changes be kept (and/or reapplied later) while aborting the current merge?</em></p>
  
  <hr>
  
  <p>Using <code>shelve</code> on the local changes was not allowed:</p>
  
  <pre><code>$ hg shelve foo/bar
  abort: cannot shelve while merging
  </code></pre>
  
  <p>Using an <code>hg up -C</code>, the normal way to 'abort a merge', would eliminate the local changes.</p>
  
  <hr>
  
  <p>This is not like <a href="https://stackoverflow.com/questions/2411418/how-to-hg-merge-without-affecting-the-working-directory">How to &#39;hg merge&#39; without affecting the working directory?</a> because a merge has already been started, just not committed. Answers that involve finishing the commit first, and then picking changes is suitable if such can be shown simply, although the question <em>is</em> focused about 'abort without the commit'.</p>