Mercurial - revert back to old version and continue from there

Posted by Paolo on Stack Overflow See other posts from Stack Overflow or by Paolo
Published on 2010-03-29T18:53:43Z Indexed on 2010/04/01 2:33 UTC
Read the original article Hit count: 322

I'm using mercurial locally for a project (it's the only repo there's no pushing/pulling to/from anywhere else).

To date it's got a linear history. However, the current thing I'm working on I've now realised is a terrible approach and I want to go back to the version before I started it and implement it a different way.

I'm a bit confused with the branch / revert / update -C commands in Mercurial. Basically I want to revert to version 38 (currently on 45) and have my next commits have 38 as a parent and carry on from there. I don't care if revisions 39-45 are lost for ever or end up in a dead-end branch of their own.

Which command / set of commands do I need?

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about hg