Mercurial 和 Subversion:更改、提交、从 SVN 拉取、推送,“抱歉,找不到合并修订版的 svn 父级。”

发布于 2024-09-26 00:07:15 字数 348 浏览 1 评论 0原文

我在工作时已将 Subversion 存储库拉入本地 Hg 存储库。在家里,我修复了一些东西,提交到我本地的 Hg 存储库中,上班后我进行了拉取和更新。

$ hg pull
$ hg update

我需要合并,所以我就这样做了。

$ hg merge

然而,当我尝试推送时:

$ hg push
abort: Sorry, can't find svn parent of a merge revision."

我在工作流程中犯了什么错误?我可以做些什么来避免将来出现这个问题?

I've pulled the Subversion repository into a local Hg repository while at work. At home, I fixed some stuff, committed into my local Hg repository, and upon coming to work I did a pull and an update.

$ hg pull
$ hg update

I needed to merge, so I did that.

$ hg merge

However, when I tried pushing:

$ hg push
abort: Sorry, can't find svn parent of a merge revision."

What mistake did I make in the workflow? What can I do to avoid the issue in the future?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

当梦初醒 2024-10-03 00:07:15

如果我没记错的话,顺序是

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 扩展。

If I remember correctly, the sequence is

hg pull 
hg up # update the repo to the head 
hg rebase --svn # rebase your_head onto svn
hg push

When you want to push the changes directly into svn, you first pull the latest changes from svn, then rebase your changes to the svn HEAD and push them back.

[Edit : These commands are not available as a part of standard hg command]

You will need to install hgsubversion Extension.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文