changeset 23146:5311de37b86f

largefiles: shortcircuit status code also for non-matching patterns We currently shortcircuit the checking for large file standins if only patterns of type 'path' are given on the command line. That makes e.g. "hg st 'glob:foo/**'" unnecessarily slow when the only large files are in a sibling directory. Relax the check to be that it is not an always-matcher and that no large files match the patterns given on the command line. Note that before this change, only the latter of the following two would show the status of files in .hglf (since the -I makes match.anypats() true). After this change, they both display the status. This behavior doesn't seem correct, but it would be a separate change to explicitly filter out .hglf even in the shortcircuit case. hg st .hglf/$file hg st .hglf/$file -I .
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 31 Oct 2014 14:11:47 -0700
parents 97b6e762f218
children 9174863c58e4
files hgext/largefiles/reposetup.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py	Mon Oct 27 21:10:24 2014 -0700
+++ b/hgext/largefiles/reposetup.py	Fri Oct 31 14:11:47 2014 -0700
@@ -102,12 +102,12 @@
                 except error.LockError:
                     pass
 
-                # First check if there were files specified on the
-                # command line.  If there were, and none of them were
+                # First check if paths or patterns were specified on the
+                # command line.  If there were, and they don't match any
                 # largefiles, we should just bail here and let super
                 # handle it -- thus gaining a big performance boost.
                 lfdirstate = lfutil.openlfdirstate(ui, self)
-                if match.files() and not match.anypats():
+                if not match.always():
                     for f in lfdirstate:
                         if match(f):
                             break