在推送到评论存储库后,“中止:无法为不可变的变更集重新设置基础".改头换面 [英] After pushing to a review repository, "abort: can't rebase immutable changeset" on rebase
问题描述
我们有一个代码复审存储库,人们在其中存放各种东西.审核完成后,我们从项目的中央存储库中提取,重新设置基础并进行推送.我最近升级到了水银2.1并收到此消息:
We have a code review repository where people hg push -f
all sorts of stuff. After reviews are complete, we pull from the project's central repository, rebase, and push. I recently upgraded to mercurial 2.1 and get this message:
abort: can't rebase immutable changeset 43ab8134e7af
(see hg help phases for details)
当我尝试从中央存储库中hg pull --rebase
时.我该如何解决?
when I try to hg pull --rebase
from the central repository. How do I fix it?
推荐答案
在评论存储库的.hg/hgrc文件中,添加以下行:
In the review repository's .hg/hgrc file, add these lines:
[phases]
publish = False
该问题归因于Mercurial 2.1中的一项新功能,称为阶段.这很棒. 此处是其用法的很好的介绍.
The problem is due to a new feature in mercurial 2.1 called phases. It's great. Here is a nice introduction to its use.
要立即使相关变更集可变,请使用hg phase -f -d REV
强制REV再次可变.更改hgrc文件后,您就不必再这样做了.
To make the changesets in question mutable right now, use hg phase -f -d REV
to force REV to be mutable again. Once the hgrc file has been changed, you shouldn't have to do that any more.
作为旁注,hg push -f
很la脚.创建一个别名hg review
,该别名与-f
一起推送到该存储库.
As a side note, hg push -f
is lame. Make an alias hg review
that pushes with -f
to that repository.
这篇关于在推送到评论存储库后,“中止:无法为不可变的变更集重新设置基础".改头换面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!