D4408: rebase: skip extinct revisions even if it has no successor in rebase set
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Aug 28 07:33:38 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4408
AFFECTED FILES
hgext/rebase.py
tests/test-rebase-obsolete.t
CHANGE DETAILS
diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -1525,11 +1525,9 @@
> A
> EOF
-TODO: There doesn't seem to be much reason to fail this rebase. Make it pass?
$ hg rebase -d D -s B
- abort: this rebase will cause divergences from: 26805aba1e60
- (to force the rebase please set experimental.evolution.allowdivergence=True)
- [255]
+ rebasing 1:112478962961 "B" (B)
+ note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence
$ cd ..
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1891,7 +1891,7 @@
# If 'srcrev' has a successor in rebase set but none in
# destination (which would be catched above), we shall skip it
# and its descendants to avoid divergence.
- if any(s in destmap for s in succrevs):
+ if srcrev in extinctrevs or any(s in destmap for s in succrevs):
obsoletewithoutsuccessorindestination.add(srcrev)
return (
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list