revset: rename generationsrel() to generationssubrel()
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 10 Apr 2020 22:22:09 +0800
changeset 44709 8859de3e83dc
parent 44708 61134a232d00
child 44710 eca82eb9d777
revset: rename generationsrel() to generationssubrel() This highlights that this is an implementation of 'x#y[z]' relation subscript operator as opposed to 'x#y' relation operator. Differential Revision: https://phab.mercurial-scm.org/D8393
mercurial/revset.py
--- a/mercurial/revset.py	Thu Apr 02 16:02:21 2020 -0400
+++ b/mercurial/revset.py	Fri Apr 10 22:22:09 2020 +0800
@@ -281,7 +281,7 @@
     return ancdepths, descdepths
 
 
-def generationsrel(repo, subset, x, rel, z, order):
+def generationssubrel(repo, subset, x, rel, z, order):
     # TODO: rewrite tests, and drop startdepth argument from ancestors() and
     # descendants() predicates
     a, b = getintrange(
@@ -2650,8 +2650,8 @@
 }
 
 subscriptrelations = {
-    b"g": generationsrel,
-    b"generations": generationsrel,
+    b"g": generationssubrel,
+    b"generations": generationssubrel,
 }