Mercurial:无法在pull-merge-commit之后推送到远程存储库

时间:2011-06-08 22:22:25

标签: mercurial

我无法弄清楚为什么我仍然无法推送到远程存储库:

> hg pull
pulling from ......
searching for changes
no changes found

> hg merge
abort: branch 'default' has one head - please merge with an explicit rev
(run 'hg heads' to see all heads)

> hg heads
changeset:   12942:...
tag:         tip
parent:      12940:...
parent:      12941:...
summary:     merge

> hg branches
default                    12942:...

> hg commit
nothing changed

最后

> hg push
pushing to ...
searching for changes
abort: push creates new remote heads on branch 'default'!
(did you forget to merge? use push -f to force)

为什么会这样?

1 个答案:

答案 0 :(得分:4)

不确定原因,但这解决了这个问题:

  

hg push -r tip

其中-r是

  

-r --rev REV [+]一个旨在包含在目的地中的变更集