mercurial push / pull问题

时间:2010-12-03 23:06:26

标签: mercurial

在我的团队朋友对我们的仓库进行推送操作后,我无法进行推送操作。

首先我提交后点击推送

Push will not be performed because it would create remote branches.

You must first resync by doing a Pull from the target repository and Merge.

后来我点击拉我得到了这个

INFO Pulling From: https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27 ...
comparing with https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27
searching for changes
no changes found
INFO Pulled From: https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27
INFO To:        hastaneBilgiSistemi - C:\Users\yakUP\Desktop\wicket\hastaneBilgiSistemi
INFO: End of Mercurial Pull

我该怎么办?

我尝试过更新。它说:

Mercurial Update
----------------
Update to revision 25 in:
C:\Users\yakUP\Desktop\wicket\hastaneBilgiSistemi
abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)

INFO: End of Update

图形如下: alt text alt text我是mercurial的新手。

1 个答案:

答案 0 :(得分:1)

要获取有关在服务器上创建新磁头的消息,请说没有新的变更集,这意味着您已经拥有了服务器上的所有变更集。

你应该做的是查看你的本地克隆并将多个头合并在一起以获得一个,然后你应该能够推动。

但是,您可能无法在Windows上执行此操作(根据您问题中的路径示例判断),因为两个文件之间存在大小写折叠碰撞:

  • src / java / itucs / blg361 / hbs / linkpage.java< - 通知linkPage中的小写p
  • src / java / itucs / blg361 / hbs / linkPage.java< - 在linkPage中注明大写字母P

这会阻止你实际使用那个分支,除非系统认为这两个文件是不同的文件(如* nix)为你摆脱其中一个,推动它,然后你拉入新的变更集

所以你有几个选择:

  • 使用--override(或GUI等效项)强制推送。这通常不是正确的方法。这将在服务器上创建另一个头,然后突然你有至少3个不同版本的项目。
  • 拉(像你一样),合并,然后推。这通常是首选。你应该将属于一起的头合并在一起,以回到一个分支。

无论如何,我会弄清楚你为什么在存储库中有多个头。有人强迫推吗?这是故意的吗?

获得TortoiseHg - 这会让您的生活更轻松

相关问题