rebase: clarify a little by calculating a set in Python instead of in revset
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 15 Jan 2020 10:44:23 -0800
changeset 44167 4263aaab651d
parent 44166 faec51c76b7b
child 44168 1cb7ae9b0071
rebase: clarify a little by calculating a set in Python instead of in revset By calculating the set in Python, we can give it a name, which helps readability. Differential Revision: https://phab.mercurial-scm.org/D7904
hgext/rebase.py
--- a/hgext/rebase.py	Wed Jan 15 15:12:50 2020 -0800
+++ b/hgext/rebase.py	Wed Jan 15 10:44:23 2020 -0800
@@ -1767,8 +1767,9 @@
                 continue
             # Revisions in the side (not chosen as merge base) branch that
             # might contain "surprising" contents
+            other_bases = set(bases) - {base}
             siderevs = list(
-                repo.revs(b'((%ld-%d) %% (%d+%d))', bases, base, base, dest)
+                repo.revs(b'(%ld %% (%d+%d))', other_bases, base, dest)
             )
 
             # If those revisions are covered by rebaseset, the result is good.