diff mercurial/revset.py @ 31809:35b8bb1ef02b

revset: stop supporting predicate that returns plain list (API) It's said to be removed after 3.9.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 02 Apr 2017 22:01:32 +0900
parents 080734cd2440
children 81abd0d12c86
line wrap: on
line diff
--- a/mercurial/revset.py	Sat Apr 01 12:24:59 2017 +0200
+++ b/mercurial/revset.py	Sun Apr 02 22:01:32 2017 +0900
@@ -169,16 +169,7 @@
 def getset(repo, subset, x):
     if not x:
         raise error.ParseError(_("missing argument"))
-    s = methods[x[0]](repo, subset, *x[1:])
-    if util.safehasattr(s, 'isascending'):
-        return s
-    # else case should not happen, because all non-func are internal,
-    # ignoring for now.
-    if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols:
-        repo.ui.deprecwarn('revset "%s" uses list instead of smartset'
-                           % x[1][1],
-                           '3.9')
-    return baseset(s)
+    return methods[x[0]](repo, subset, *x[1:])
 
 def _getrevsource(repo, r):
     extra = repo[r].extra()