revset: remove useless extpredicate class (API)
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 11 Mar 2016 04:14:54 +0900
changeset 28445 d749b1832d2f
parent 28444 12fdf49fa4dd
child 28446 08bd09921102
revset: remove useless extpredicate class (API) Previous patch makes this classes useless by replacing it with revsetpredicate of registrar. BTW, extpredicate itself has already been broken by that patch, because revsetpredicate of registrar doesn't have compatibility with original predicate (derived from funcregistrar of registrar), in fact.
mercurial/revset.py
--- a/mercurial/revset.py	Thu Mar 10 10:12:23 2016 -0800
+++ b/mercurial/revset.py	Fri Mar 11 04:14:54 2016 +0900
@@ -484,28 +484,6 @@
 
 predicate = registrar.revsetpredicate()
 
-class extpredicate(registrar.delayregistrar):
-    """Decorator to register revset predicate in extensions
-
-    Usage::
-
-        revsetpredicate = revset.extpredicate()
-
-        @revsetpredicate('mypredicate(arg1, arg2[, arg3])')
-        def mypredicatefunc(repo, subset, x):
-            '''Explanation of this revset predicate ....
-            '''
-            pass
-
-        def uisetup(ui):
-            revsetpredicate.setup()
-
-    'revsetpredicate' instance above can be used to decorate multiple
-    functions, and 'setup()' on it registers all such functions at
-    once.
-    """
-    registrar = predicate
-
 @predicate('_destupdate')
 def _destupdate(repo, subset, x):
     # experimental revset for update destination