54

我在 host1 上有一个主存储库,并对 host2 上的一个存储库进行了更新。我hg push编辑了从 host2 到 host1 的更改

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

但是,当我尝试更新或合并时,我得到

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

我也尝试了hg pull来自host1,但这也没有用......

[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]$

我需要做什么才能使用来自 host2 的更改来更新我在 host1 上的主存储库?


有关 host1 上的 repo 的更多信息...

[mpenning@host1 login]$ hg parents
changeset:   27:6d530d533997
user:        Mike Pennington <d.pennington@foo.local>
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 <d.pennington@foo.local>
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]$
4

2 回答 2

100

hg update --clean -r tip解决了问题...

[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]$
于 2012-10-02T12:47:45.143 回答
14

在某些时候你做了:

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

……然后继续。这使合并未提交。这就是“中止:未提交的合并”的意思。你不能做'x',因为你还没有完成你开始的合并工作。

你应该做的是:

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

……然后继续。

hg status并且hg summary会显示出明显的变化。

于 2012-10-04T16:07:28.863 回答