Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to abandon a hg merge?

I'm new to collaborating with Mercurial. My situation:

  • Another programmer changed rev 1 of a file to replace 4-space indents with 2-space indent. (I.e. changed every line.) Call that rev 2, pushed to the remote repo.
  • I've committed substantive changes rev 1 with various code changes in my local workspace. Call that rev 3.
  • I've hg pulled and hg merged without a clear idea of what was going on.
  • The conflicts are myriad and not really substantive.

So I really wish I'd changed my local repo to 2-space indents before merging; then the merge will be trivial (i'm supposing). But I can't seem to back up. I think I need to hg update -r 3 but it says abort: outstanding uncommitted merges.

How can I undo the merge, changes spacing in my local repo, and remerge?

like image 975
Grumdrig Avatar asked Apr 03 '10 02:04

Grumdrig


People also ask

What is backout in mercurial?

Backout works by applying a changeset that's the opposite of the changeset to be backed out. That new changeset is committed to the repository, and eventually merged.

How do I merge Mercurials?

To merge two branches, you pull their heads into the same repository, update to one of them and merge the other, and then commit the result once you're happy with the merge.


1 Answers

BTW: if you just revert the merge you did and 3 is not your revision number you can do this:

hg update -C -r . 
like image 183
math Avatar answered Sep 19 '22 12:09

math