tags:

views:

45

answers:

1

I used the Mercurial collapse command and then attempted a rollback). I now know that this is something that I shouldn't have done.

hg status
abort: working directory has unknown parent 'e1f07eea60bf'!

The working copy contains a reasonably recent version, at least, but I can't commit it.

hg commit
abort: 00changelog.i@e1f07eea60bf: no node!

How would you best recover from this situation? With regards to history, most of it has been pushed to the central repository anyway.

+3  A: 

Try hg debugsetparent xxxx, It's not the safest command in the world, but it should help you out. Set the parent to a revision that is in your log.

Ry4an
That put my repository into a working state, but it was lacking consistency. For example, some files were missing, but not recorded as deleted in any revision. I pushed my changes onto a queue, then did a clean update to a very old version, then to the latest version. I then force pushed to patch back on top and eventually ended up in a decent state.
Casebash