title: How to prevent a file from automatically merging when switching branches in Mercurial?
body: <p>Let's say I have two branches named <code>default</code> and <code>newfeature</code>. I have a file called <code>readme.txt</code> in both branches. I'm working on the <code>newfeature</code> branch and I make a change to readme.txt. If I run <code>hg up default</code> without committing the change, Mercurial automatically merges the version of readme.txt in <code>newfeature</code> directly into <code>default</code>.</p>
  
  <p>How can I change this behavior? What I'm worried about is developers forgetting to commit before they switch branches, thus merging whatever they've been working on.</p>
  
  <p>This is what the process looks like:</p>
  
  <pre><code>C:\source\BranchTest\Main&gt;hg branch
  Exams
  
  C:\source\BranchTest\Main&gt;hg status
  M readme.txt
  
  C:\source\BranchTest\Main&gt;hg up default
  merging readme.txt
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  
  C:\source\BranchTest\Main&gt;
  </code></pre>
  
  <p>Notice the automatic merge because I didn't commit the change to readme.txt. Mercurial doesn't warn me that this will happen. </p>
  
  <p>Any suggestions?</p>