# HG changeset patch # User Martin von Zweigbergk # Date 1496331081 25200 # Node ID 783394c0c97807e83daad9da561179bd0719e159 # Parent 7a209737f01ce0d153244fd36bb417edfd8a3039 match: simplify nevermatcher Most of it does the same as its superclass, so it can simply be removed. It also seems to make more sense for it to use relative paths, as we do for everything except alwaysmatcher, although nevermatcher.uipath() will probably never get called anyway, so it won't matter. diff -r 7a209737f01c -r 783394c0c978 mercurial/match.py --- a/mercurial/match.py Sat Jun 03 00:25:24 2017 +0900 +++ b/mercurial/match.py Thu Jun 01 08:31:21 2017 -0700 @@ -153,8 +153,7 @@ listsubrepos=listsubrepos, badfn=badfn) else: # It's a little strange that no patterns means to match everything. - # Consider changing this to match nothing (probably adding a - # "nevermatcher"). + # Consider changing this to match nothing (probably using nevermatcher). m = alwaysmatcher(root, cwd, badfn) if include: @@ -345,18 +344,8 @@ class nevermatcher(basematcher): '''Matches nothing.''' - def __init__(self, root, cwd, badfn=None, relativeuipath=False): - super(nevermatcher, self).__init__(root, cwd, badfn, - relativeuipath=relativeuipath) - - def always(self): - return False - - def matchfn(self, f): - return False - - def visitdir(self, dir): - return False + def __init__(self, root, cwd, badfn=None): + super(nevermatcher, self).__init__(root, cwd, badfn) def __repr__(self): return ''