我是 mercurial 的新手。我最近与 2 位同事建立了一个存储库,并且在推送我的代码时遇到了困难。[我在 Windows 中使用命令行 hg]。特别是当我推动时,我得到如下对话:
>hg commit -u petermr
>hg push
pushing to http://bitbucket.org/petermr/polyinfo/
searching for changes
abort: push creates new remote heads!
(did you forget to merge? use push -f to force)
>hg merge
abort: there is nothing to merge
>hg status
我害怕使用 push -f 提交,因为我认为这会产生多个头并给我们的团队带来问题。
当我尝试合并时,我得到一个类似的对话:
>hg merge -f
merging src/test/resources/PMR/algorithm/cmlAll.xml
output file src/test/resources/PMR/algorithm/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/irregular/cmlAll.xml
output file src/test/resources/PMR/irregular/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/massChange/cmlAll.xml
output file src/test/resources/PMR/massChange/cmlAll.xml appears unchanged
was merge successful (yn)? y
由于有数百个文件,我无法为每个文件键入“y”,也找不到将它们合并在一起的方法。
更新我已经尝试了前(2)个答案,但仍然有问题:
>hg pull
pulling from http://bitbucket.org/petermr/polyinfo/
searching for changes
no changes found
>hg merge
abort: outstanding uncommitted merges
更新以响应@tonfa 我无法提交:
>hg commit
abort: unresolved merge conflicts (see hg resolve)
更新@balpha(我已将所有者的名称更改为 Foo)
>hg parent
changeset: 24:9ec904d2d5a2
tag: tip
user: petermr
date: Sat Jan 09 16:40:38 2010 +0000
summary: trying to sync
changeset: 22:360aedb72f0e
parent: 21:89c4bd671bd3
parent: 18:3cffa8ca3a2a
user: Foo (not me)
date: Fri Jan 08 16:15:50 2010 +0000
summary: merged
>hg tip
changeset: 24:9ec904d2d5a2
tag: tip
user: petermr
date: Sat Jan 09 16:40:38 2010 +0000
summary: trying to sync
更新
汞头
changeset: 24:9ec904d2d5a2
tag: tip
user: petermr
date: Sat Jan 09 16:40:38 2010 +0000
summary: trying to sync
changeset: 22:360aedb72f0e
parent: 21:89c4bd671bd3
parent: 18:3cffa8ca3a2a
user: Foo (not me)
date: Fri Jan 08 16:15:50 2010 +0000
summary: merged
在下面的@balpha 评论之后更新谁建议 revert 要求修订(这是一个数字吗?如果是,我怎么找到它?)
>hg revert --all
abort: uncommitted merge - please provide a specific revision
UPDATE仍然无法合并...
>hg revert --all -r tip
reverting .hgignore
reverting .hgignore~
reverting src\test\java\org\xmlcml\cml\converters\polyinfo\RegressionTest.java
reverting src\test\resources\PMR\algorithm\cmlAll.xml
reverting src\test\resources\PMR\irregular\cmlAll.xml
reverting src\test\resources\PMR\massChange\cmlAll.xml
reverting src\test\resources\PMR\massChangeOk\cmlAll.xml
reverting src\test\resources\PMR\ok\P340076.both.svg
reverting src\test\resources\PMR\ok\P340076.p.svg
reverting src\test\resources\PMR\ok\P340076.r.svg
reverting src\test\resources\PMR\ratio\cmlAll.xml
>hg status
M .hgignore
M .hgignore~
M src\test\resources\PMR\algorithm\cmlAll.xml
M src\test\resources\PMR\irregular\cmlAll.xml
M src\test\resources\PMR\massChange\cmlAll.xml
M src\test\resources\PMR\massChangeOk\cmlAll.xml
M src\test\resources\PMR\ok\P340076.both.svg
M src\test\resources\PMR\ok\P340076.p.svg
M src\test\resources\PMR\ok\P340076.r.svg
M src\test\resources\PMR\ratio\cmlAll.xml
? src\test\resources\PMR\bug\P020006work.both.svg
? src\test\resources\PMR\irregular\cmlAll.xml.resolve
>hg merge
abort: outstanding uncommitted merges
>hg commit
abort: unresolved merge conflicts (see hg resolve)
注意
hg resolve -all
提出了必须对数百个单独的问题回答“y”的原始问题,我不知道它是否会解决问题。非常感谢您的帮助!
更新@balpha 建议清洁 - 这似乎取得了进展
>hg update --clean -r tip
10 files updated, 0 files merged, 0 files removed, 0 files unresolved
>hg merge
merging src/test/resources/PMR/algorithm/cmlAll.xml
output file src/test/resources/PMR/algorithm/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/irregular/cmlAll.xml
output file src/test/resources/PMR/irregular/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/massChange/cmlAll.xml
output file src/test/resources/PMR/massChange/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/massChangeOk/cmlAll.xml
output file src/test/resources/PMR/massChangeOk/cmlAll.xml appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/ok/P340076.both.svg
output file src/test/resources/PMR/ok/P340076.both.svg appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/ok/P340076.p.svg
output file src/test/resources/PMR/ok/P340076.p.svg appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/ok/P340076.r.svg
output file src/test/resources/PMR/ok/P340076.r.svg appears unchanged
was merge successful (yn)? y
merging src/test/resources/PMR/ratio/cmlAll.xml
output file src/test/resources/PMR/ratio/cmlAll.xml appears unchanged
was merge successful (yn)? y
2 files updated, 8 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
>hg merge
abort: outstanding uncommitted merges
>hg merge -f
abort: outstanding uncommitted merges
>hg commit -u petermr -m "still trying to sy
nc"
>hg merge
abort: there is nothing to merge
>hg push
pushing to http://bitbucket.org/petermr/polyinfo/
searching for changes
http authorization required
realm: Bitbucket.org HTTP
user: petermr
password:
adding changesets
adding manifests
adding file changes
added 4 changesets with 298 changes to 290 files
bb/acl: petermr is allowed. accepted payload.
quota: 13.3 MB in use, 150.0 MB available (8.87% used)