changeset 6637:8a51498b9976

topic: remove subscript relation compatibility for revsets in hg 4.9
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 03 Nov 2023 13:44:45 -0300
parents 7f95546f584e
children 0a7487cdfe20
files hgext3rd/topic/revset.py
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/revset.py	Thu Jan 04 13:33:28 2024 -0300
+++ b/hgext3rd/topic/revset.py	Fri Nov 03 13:44:45 2023 -0300
@@ -158,16 +158,11 @@
         (e.g. when stack index is too high), this returns empty set to be more
         revset-friendly.
         """
-        # hg 4.9 provides a number or None, hg 5.0 provides a tuple of tokens
-        if isinstance(z, tuple):
-            a, b = revset.getintrange(
-                z,
-                b'relation subscript must be an integer or a range',
-                b'relation subscript bounds must be integers',
-                None, None)
-        else:
-            # hg <= 4.9 (431cf2c8c839+13f7a6a4f0db)
-            a = b = z
+        a, b = revset.getintrange(
+            z,
+            b'relation subscript must be an integer or a range',
+            b'relation subscript bounds must be integers',
+            None, None)
 
         s = revset.getset(repo, revset.fullreposet(repo), x)
         if not s: