# HG changeset patch # User Martin von Zweigbergk # Date 2014-11-02 05:56:49 # Node ID 609ecde2778fc54bd381333363c0db1c700b8142 # Parent 141baca1605917f36178679c81a6e70a032de0ff match: make 'always' and 'exact' functions, not classes There is no reason for classes 'always' and 'exact' not to be just functions that return instances the plain 'match' class. diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -156,13 +156,11 @@ class match(object): - optimization might be possible and necessary.''' return self._always -class exact(match): - def __init__(self, root, cwd, files): - match.__init__(self, root, cwd, files, exact=True) +def exact(root, cwd, files): + return match(root, cwd, files, exact=True) -class always(match): - def __init__(self, root, cwd): - match.__init__(self, root, cwd, []) +def always(root, cwd): + return match(root, cwd, []) class narrowmatcher(match): """Adapt a matcher to work on a subdirectory only.