当没有更改时,如何解决“放弃合并未提交的更改”错误?

时间:2019-05-04 06:59:41

标签: mercurial

我重新检查了我的日常项目,并更新了小费。我正在尝试与另一个分支合并,但收到错误abort uncommitted changes

> hg up
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to "f9e1acf1f459: <commit message>"
1 other heads for branch "<branch>"

> hg merge
abort: uncommitted changes
(use 'hg status' to list changes)

> hg status



> hg status -i



> hg status -u



> hg summary
parent: 7008:f9e1acf1f459 tip
 <message for last commit>
branch: <branch>
commit: (clean)
update: 26 new changesets, 2 branch heads (merge)

>hg version
Mercurial Distributed SCM (version 4.9.1)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2019 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我尝试使用旧版本的mercurial(4.7.1),但结果相同。

我该如何解决?

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题 -(5.7 版)。在搜索并尝试了很多事情之后,我找到了一种解决方法:

delete everything except .hg directory
hg update --clean branch-name

我仍然不知道为什么 hg status 没有显示变化而 hg merge 因为有变化而中止