The good news is I haven't pushed any changes yet. I had working code which I then committed as changeset 3526. Then I did an hg pull and hg merge. While doing the merge, I screwed up.
I would like to revert back to changeset 3526. (The tip is currently at changeset 3640.) But in doing this revert, I would like to satisfy the following conditions:
- I want it to be as if I never did the hg pull and hg merge.
- I don't want any dangling heads or new branches.
- After successfully doing the operation, I want the hg log to only read up to changeset 3526, as if I never did the hg pull or hg merge.
- I don't want to create a new revision that matches 3526 -- I want to be back at revision 3526.
What operation should I use to accomplish the above? I'm aware that you can do similar things using hg update, hg revert, and hg clone. But I'm not sure what exact command I should use, especially since, in some cases, you end up creating dangling heads or new branches.
What's the exact command that I'm looking for?