Mercurial:避免跳过祖先修订版的方法 [英] Mercurial : Way to avoid skipping ancestor revision

查看:85
本文介绍了Mercurial:避免跳过祖先修订版的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与>跳过祖先"类似的问题版本"是指使用嫁接"时的意思?

但是这个SO主题没有给出解决方案,只是给出了解释.

But this SO topic don't give solutions, only explanations.

更多详细信息:昨天,一位同事犯了一个错误,然后将其推送.在此之后,其他同事和我也添加了承诺.为了快速修复此错误,我使用了hg backout取消了此提交号11511. 但是我不想丢失此提交,因此我创建了一个新分支(从回退提交),我尝试移植11511提交,但Mercurial表示:

In more details : Yesterday a co-worker commited an error and push it. Others co-workers and me added commits after this. In order to fix this error quickly I used hg backout to cancel this commit number 11511. But I don't want to loose this commit, so I created a new branch (from the backout commit) and I tried to graft the 11511 commit but Mercurial says :

跳过祖先修订版

我想获取带有11511 commit更改的分支以修复错误.有什么解决方案?

I want getting the branch with the 11511 commit changes to fix the error. What are the solutions to do it ?

推荐答案

Mercurial感到困惑,因为您试图嫁接历史中已经存在的提交(并且没有意识到撤消已将其还原).

Mercurial gets confused because you are trying to graft a commit that already exists in the history (and doesn't realize that the backout reverted it).

有两种可能的解决方案.一种,使用-f选项强制hg graft继续执行:

There are a couple of possible solutions. One, use the -f option to force hg graft to proceed anyway:

hg graft -f -r 11511

或者,您可以在创建的分支上再次撤消撤消的提交.

Or, you can backout the backed out commit again on the branch that you created.

这篇关于Mercurial:避免跳过祖先修订版的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆