Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial / hg - abort: outstanding uncommitted merges

Tags:

mercurial

I have a master repo on host1 and made an update to a repo on host2. I hg pushed the changes from host2 to host1 with

[mpenning@host2 login]$  hg push ssh://host1//opt/python/login

However, when I try to update or merge, I get

[mpenning@host1 login]$ hg update
abort: outstanding uncommitted merges
[mpenning@host1 login]$ hg merge
abort: outstanding uncommitted merges
[mpenning@host1 login]$ 

I also tried a hg pull from host1, but that didn't work either...

[mpenning@host1 login]$ hg pull ssh://host2//opt/python/login
running ssh host2 'hg -R /opt/python/login serve --stdio'
mpenning@host2's password:
pulling from ssh://host2//opt/python/login
searching for changes
no changes found
[mpenning@host1 login]$ hg merge
abort: outstanding uncommitted merges
[mpenning@host1 login]$

What do I need to do to update my master repo on host1 with the changes from host2?


More information about the repo on host1...

[mpenning@host1 login]$ hg parents
changeset:   27:6d530d533997
user:        Mike Pennington <[email protected]>
date:        Wed Sep 26 11:44:51 2012 -0500
files:       mp_getconf.py
description:
fix issue where config retrieval was broken


changeset:   29:eaf3b5aacfe6
user:        Mike Pennington <[email protected]>
date:        Wed Sep 26 11:43:15 2012 -0500
files:       mp_getconf.py
description:
fix artifact of using the script to run generic commands, but this broke config retrieval


[mpenning@host1 login]$
like image 698
Mike Pennington Avatar asked Oct 02 '12 12:10

Mike Pennington


2 Answers

hg update --clean -r tip resolved the problem...

[mpenning@host1 login]$ hg update --clean -r tip
resolving manifests
getting Protocol.py
getting Session.py
getting mp_getconf.py
getting mp_runcmd.py
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
[mpenning@host1 login]$ hg up
resolving manifests
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[mpenning@host1 login]$
like image 69
Mike Pennington Avatar answered Oct 16 '22 15:10

Mike Pennington


At some point you did:

$ hg pull (or maybe someone pushed to you)
$ hg merge

...and then carried on. This left the merge uncommitted. That's what 'abort: outstanding uncommitted merges' means. You can't do 'x' because there's you haven't finished working on the merge you started.

What you should have done is:

$ hg pull
$ hg merge
  <Sorted out any issues>
$ hg commit -m 'Merged the blah with wibble-wah'

...and then carried on.

hg status and hg summary would have shown there were outstanding changes.

like image 41
Paul S Avatar answered Oct 16 '22 16:10

Paul S