Mercurial > hg
comparison mercurial/match.py @ 8522:39fd67552297
match: use self.exact instead of lambda
self.exact uses a set and does not need an extra copy of the files
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Fri, 15 May 2009 09:43:30 +0200 |
parents | 5d4d88a4f5e6 |
children | 744d6322b05b |
comparison
equal
deleted
inserted
replaced
8521:9fe16b1a1786 | 8522:39fd67552297 |
---|---|
43 def __init__(self, root, cwd): | 43 def __init__(self, root, cwd): |
44 _match.__init__(self, root, cwd, [], lambda f: False, False) | 44 _match.__init__(self, root, cwd, [], lambda f: False, False) |
45 | 45 |
46 class exact(_match): | 46 class exact(_match): |
47 def __init__(self, root, cwd, files): | 47 def __init__(self, root, cwd, files): |
48 _match.__init__(self, root, cwd, files, lambda f: f in files, False) | 48 _match.__init__(self, root, cwd, files, self.exact, False) |
49 | 49 |
50 class match(_match): | 50 class match(_match): |
51 def __init__(self, root, cwd, patterns, include, exclude, default): | 51 def __init__(self, root, cwd, patterns, include, exclude, default): |
52 f, mf, ap = util.matcher(root, cwd, patterns, include, exclude, | 52 f, mf, ap = util.matcher(root, cwd, patterns, include, exclude, |
53 None, default) | 53 None, default) |