Casebash
Casebash

Reputation: 118972

How to fix Mercurial repository after collapse and rollback?

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.

Upvotes: 5

Views: 1534

Answers (1)

Ry4an Brase
Ry4an Brase

Reputation: 78350

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.

Upvotes: 5

Related Questions