From patchwork Thu Jan 16 08:10:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7904: rebase: clarify a little by calculating a set in Python instead of in revset From: phabricator X-Patchwork-Id: 44412 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 16 Jan 2020 08:10:28 +0000 martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY By calculating the set in Python, we can give it a name, which helps readability. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7904 AFFECTED FILES hgext/rebase.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1765,8 +1765,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.