[PATCH 1 of 4] revset: remove useless class

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Wed Mar 9 09:29:07 EST 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1457533235 -32400
#      Wed Mar 09 23:20:35 2016 +0900
# Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b
# Parent  f126bb86a4e282fc1113a9c67777e9ca3764e57b
revset: remove useless class

Previous patch makes this classes useless by replacing it with
registrar.revsetpredicate.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -484,28 +484,6 @@ safesymbols = set()
 
 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


More information about the Mercurial-devel mailing list