I\'m new to collaborating with Mercurial. My situation:
BTW: if you just revert the merge you did and 3 is not your revision number you can do this:
hg update -C -r .
I apparently just needed to hg update -C -r 3
, which overwrites my local files with the rev in mind (which is what I thought hg update
would do; but I was wrong.) Thanks for my help!
To undo an uncommitted merge, use
hg update --clean
which will check out a clean copy of the original merge parent, losing all changes.
You can discard uncommitted changes with the -C (or --clean) flag:
hg update -C -r 3
BEWARE: Everything that was not committed will be gone!
After that you should probably use some kind of code formatter tool to do the entire operation, or at least some find and replace with regular expressions. Something as simple as replacing what matches ^____
(use 4 spaces instead of underscores) with __
(2 spaces), repeated a few times (unless you have insanely some nested code) should work.