title: How can I repair a repository broken by hg unshelve?
body: <p>I used <code>hg shelve</code> in a repository, where I had some unfinished changes because I needed to switch to a different head and perform unrelated changes.</p>
  
  <p>Once my work on the other head was committed, I switched back to the head on which I had originally used <code>hg shelve</code> and ran a <code>hg unshelve</code> command. This was the result:</p>
  
  <pre><code>$ hg unshelve
  unshelving change 'default'
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 4 changes to 4 files (+1 heads)
  abort: uncommitted changes
  $ hg diff
  warning: ignoring unknown working parent 893e15ecb5b4!
  $ 
  </code></pre>
  
  <p>I did run <code>hg head</code> before and after the <code>unshelve</code> command and saw identical outputs. The commit <code>893e15ecb5b4</code> never existed, I have no clue where Mercurial got it from.</p>
  
  <p>In case it is of any relevance, I am running Mercurial version 2.8.2 on Ubuntu 14.04.</p>
  
  <p>How can I get my repository back in a working state, and how can I get my shelved changes back?</p>