title: Mercurial - basic process to revert a merge and try again
body: <p>We merge using this process:</p>
  
  <pre><code>cd c:\myapp
  hg pull ssh://hg/myapp-1_0_1
  hg merge 
  </code></pre>
  
  <p>Now sometimes we mess up the merge or sometimes we get an error (ie: "can't merge file xxx - file in use").  Usually I just delete my c:\myapp repo, re-clone from the remote master repo and start over.  This works but it's a pain.  What is a better way?</p>
  
  <p>I've read about using <code>hg update -C</code> but I'm not clear on the process.  So you'd do <code>hg update -C</code>, this would delete the merged files but keep the changesets that were pulled down, and then you'd issue the <code>hg merge</code> command again and try again?  </p>
  
  <hr>
  
  <p><strong>Update</strong> Regarding the related <a href="https://stackoverflow.com/questions/2570087/how-to-abandon-a-hg-merge">question</a>: <code>hg update -C</code> still keeps the changesets in the repo which were pulled down with <code>hg pull</code> - how can you get rid of those?</p>