[PATCH 06 of 19 STABLE] largefiles: use 'match.convert()' to create lfdirstate matcher for 'status()'

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Feb 27 04:46:31 CST 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1330335216 -32400
# Branch stable
# Node ID 02105981446ab98cc889f745c8caa20d07bba536
# Parent  983e2f9456bd274ca7e26410c1316fb4372e94be
largefiles: use 'match.convert()' to create lfdirstate matcher for 'status()'

this patch just replaces 'accessing/modifying internal information of
matcher' implementation by 'using match.convert()' one.

diff -r 983e2f9456bd -r 02105981446a hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py	Mon Feb 27 18:33:36 2012 +0900
+++ b/hgext/largefiles/reposetup.py	Mon Feb 27 18:33:36 2012 +0900
@@ -166,8 +166,11 @@
                         orig_ignore = lfdirstate._ignore
                         lfdirstate._ignore = _ignoreoverride
 
-                        match._files = [f for f in match._files if f in
-                            lfdirstate]
+                        def filefn(files):
+                            for f in files:
+                                if f in lfdirstate:
+                                    yield f
+                        match = match.convert(filefn)
                         # Don't waste time getting the ignored and unknown
                         # files again; we already have them
                         s = lfdirstate.status(match, [], False,


More information about the Mercurial-devel mailing list