我在工作时已将 Subversion 存储库拉入本地 Hg 存储库。在家里,我修复了一些东西,提交到我的本地 Hg 存储库中,上类后我进行了拉取和更新。
$ hg pull
$ hg update
我需要 merge ,所以我这样做了。
$ hg merge
但是,当我尝试插入时:
$ hg push
abort: Sorry, can't find svn parent of a merge revision."
我在工作流程中犯了什么错误?我可以做些什么来避免将来出现这个问题?
最佳答案
如果我没记错的话,顺序是
hg pull
hg up # update the repo to the head
hg rebase --svn # rebase your_head onto svn
hg push
当你想将更改直接推送到 svn 时,你首先从 svn 中提取最新的更改,然后将更改重新设置到 svn HEAD 并将其推回。
[编辑:这些命令不能作为标准 hg 命令的一部分]
您需要安装 hgsubversion 扩展。
- http://bitbucket.org/durin42/hgsubversion/overview
- http://mercurial.aragost.com/kick-start/hgsubversion.html
- http://blog.red-bean.com/sussman/?p=116
- http://code.google.com/p/hgsubversion/
- http://farmdev.com/thoughts/64/try-out-the-mercurial-subversion-extension-hg-svn-on-mac-os-x/
- http://cecinestpasun.com/entries/getting-hgsubversion-work-under-osx/
关于svn - Mercurial 和 Subversion : changing, 提交、从 SVN 拉取、推送, "Sorry, can' t 找到 merge 修订版的 svn 父级。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3828895/