是对每个变更集使用backout命令进行逐一处理的最可靠方法,或者是否有办法创建一个大的反转变更集以覆盖整个 [edit:non -contiguous] 变更集.
Is the most reliable method to go one-by-one, using the backout command for each of many changesets, or is there a way to create one big reversal changeset to cover a whole bunch of [edit: non-contiguous] changesets.
如果一对一,顺序重要吗? (应该倒数第一吗?)
If one-by-one, does order matter? (Should one go last-to-first?)
如果在此过程中不同子项目之间存在合并,最好的方法是否有所不同?
Does the best method differ if there are merges among different sub-projects along the way?
在您的体验中,这种做法是否会顺利进行? :-)
Does this tend to go smoothly in your experience? :-)
推荐答案rebase有--collapse选项.
Helgi 的答案可以升级为:
1 -- A -- 2 -- B -- 3 -- C -- 4 -- 5 \ C' -- B' -- A' $ hg update --clean C $ hg backout --rev C --message "Backed out changeset: C" $ hg backout --rev B $ hg commit --message "Backed out changeset: B" $ hg backout --rev A $ hg commit --message "Backed out changeset: A" $ hg rebase --collapse --source C' --dest 5 $ hg commit --message "Backed out C, B, A"这将导致以下结果
1 -- A -- 2 -- B -- 3 -- C -- 4 -- 5 -- C'B'A'但是,在单独的分支中退出可能会导致后续合并中的 [逻辑] 冲突.
However, backing out in separate branch may result in [logical] conflict in the subsequent merge.
1 -- A -- 2 -- B -- 3 -- X -- 4 \ \ B' -- A' -- M如果X依赖于A或B,则M将具有冲突(至少是逻辑冲突).
if X depends on A or B, then M will have conflict (at least logical conflict).
更多推荐
在Mercurial中回退多个变更集的最佳方法是什么?
发布评论