title: Better way to set the parent to an ancestor change set and get the content of the tip
body: <p>The best way I found was:</p>
  
  <pre><code>hg update -r0 -C #ancestor rev 0
  hg revert -r tip --all
  </code></pre>
  
  <p>To illustrate the situation a bit:</p>
  
  <pre><code>hg init
  echo "init" &gt; a.txt
  hg commit -A -m“init” a.txt #rev 0
  
  echo "hello" &gt; a.txt
  hg commit -m"change"
  
  hg update -r0 -C
  hg revert -r tip --all
  </code></pre>
  
  <p>The interesting properties are <code>hg diff -r tip</code> is empty and <code>hg parent</code> is <code>changeset: 0</code>.</p>