[PATCH 4 of 4] match: use self.exact instead of lambda

Simon Heimberg simohe at besonet.ch
Tue May 19 02:26:48 CDT 2009


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1242373410 -7200
# Node ID cff7da9afb665dae3b0b91d683ca773c2a9e91c8
# Parent  19a134f738f5ac0720bc08fbe6507f4eb4769fd9
match: use self.exact instead of lambda

self.exact uses a set and does not need an extra copy of the files

diff -r 19a134f738f5 -r cff7da9afb66 mercurial/match.py
--- a/mercurial/match.py	Don Mai 14 19:54:26 2009 +0200
+++ b/mercurial/match.py	Fre Mai 15 09:43:30 2009 +0200
@@ -45,7 +45,7 @@
 
 class exact(_match):
     def __init__(self, root, cwd, files):
-        _match.__init__(self, root, cwd, files, lambda f: f in files, False)
+        _match.__init__(self, root, cwd, files, self.exact, False)
 
 class match(_match):
     def __init__(self, root, cwd, patterns, include, exclude, default):


More information about the Mercurial-devel mailing list