Mercurial > evolve
changeset 6639:6518a3b951dc
topic: remove subscript relation compatibility checks for hg 5.3
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 07 Jan 2024 14:27:11 -0300 |
parents | 0a7487cdfe20 |
children | 7169272b1b90 |
files | hgext3rd/topic/revset.py |
diffstat | 1 files changed, 6 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/revset.py Fri Nov 03 13:47:13 2023 -0300 +++ b/hgext3rd/topic/revset.py Sun Jan 07 14:27:11 2024 -0300 @@ -4,7 +4,6 @@ error, registrar, revset, - util, ) from mercurial.utils import stringutil @@ -199,20 +198,14 @@ def topicsubrel(repo, subset, x, *args): subset &= topicset(repo, subset, x) - # not using revset.generationssubrel directly because it was renamed - # hg <= 5.3 (8859de3e83dc) - generationssubrel = revset.subscriptrelations[b'generations'] - return generationssubrel(repo, subset, x, *args) + return revset.generationssubrel(repo, subset, x, *args) revset.subscriptrelations[b'topic'] = topicsubrel revset.subscriptrelations[b't'] = topicsubrel -# x#y revset operator support (no support for older version) -# hg <= 5.3 (eca82eb9d777) -if util.safehasattr(revset, 'relations'): - def stackrel(repo, subset, x, rel, order): - z = (b'rangeall', None) - return stacksubrel(repo, subset, x, rel, z, order) +def stackrel(repo, subset, x, rel, order): + z = (b'rangeall', None) + return stacksubrel(repo, subset, x, rel, z, order) - revset.relations[b'stack'] = stackrel - revset.relations[b's'] = stackrel +revset.relations[b'stack'] = stackrel +revset.relations[b's'] = stackrel