[PATCH 07 of 19 STABLE] largefiles: check whether specified patterns are related to largefiles strictly

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


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1330335216 -32400
# Branch stable
# Node ID 55bfbb4eef293f558302b0b70e20e5789e911c1e
# Parent  02105981446ab98cc889f745c8caa20d07bba536
largefiles: check whether specified patterns are related to largefiles strictly

current 'lfiles_repo.status()' implementation examines whether
specified pattern is related to largefiles in working directory (not
to STANDIN) or not by 'f in lfdirstate'.

but it can not be assumed that all in 'match.files()' are file itself
exactly, because user may only specify part of path to match whole
under sub-directories recursively.

this patch uses 'dirs()' of lfdirstate.

diff -r 02105981446a -r 55bfbb4eef29 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
@@ -168,7 +168,10 @@
 
                         def filefn(files):
                             for f in files:
-                                if f in lfdirstate:
+                                # ignore 'STANDIN direct' pattern
+                                if lfutil.isstandin(f):
+                                    continue
+                                if f in lfdirstate or f in lfdirstate.dirs():
                                     yield f
                         match = match.convert(filefn)
                         # Don't waste time getting the ignored and unknown


More information about the Mercurial-devel mailing list