Mercurial > hg
comparison hgext/rebase.py @ 44167:4263aaab651d
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 15 Jan 2020 10:44:23 -0800 |
parents | e733c59f3c09 |
children | 1cb7ae9b0071 |
comparison
equal
deleted
inserted
replaced
44166:faec51c76b7b | 44167:4263aaab651d |
---|---|
1765 for i, base in enumerate(bases): | 1765 for i, base in enumerate(bases): |
1766 if base == nullrev: | 1766 if base == nullrev: |
1767 continue | 1767 continue |
1768 # Revisions in the side (not chosen as merge base) branch that | 1768 # Revisions in the side (not chosen as merge base) branch that |
1769 # might contain "surprising" contents | 1769 # might contain "surprising" contents |
1770 other_bases = set(bases) - {base} | |
1770 siderevs = list( | 1771 siderevs = list( |
1771 repo.revs(b'((%ld-%d) %% (%d+%d))', bases, base, base, dest) | 1772 repo.revs(b'(%ld %% (%d+%d))', other_bases, base, dest) |
1772 ) | 1773 ) |
1773 | 1774 |
1774 # If those revisions are covered by rebaseset, the result is good. | 1775 # If those revisions are covered by rebaseset, the result is good. |
1775 # A merge in rebaseset would be considered to cover its ancestors. | 1776 # A merge in rebaseset would be considered to cover its ancestors. |
1776 if siderevs: | 1777 if siderevs: |