##// END OF EJS Templates
largefiles: check whether specified patterns are related to largefiles strictly...
FUJIWARA Katsunori -
r16110:41417443 stable
parent child Browse files
Show More
@@ -118,8 +118,10 b' def reposetup(ui, repo):'
118 # handle it -- thus gaining a big performance boost.
118 # handle it -- thus gaining a big performance boost.
119 lfdirstate = lfutil.openlfdirstate(ui, self)
119 lfdirstate = lfutil.openlfdirstate(ui, self)
120 if match.files() and not match.anypats():
120 if match.files() and not match.anypats():
121 matchedfiles = [f for f in match.files() if f in lfdirstate]
121 for f in lfdirstate:
122 if not matchedfiles:
122 if match(f):
123 break
124 else:
123 return super(lfiles_repo, self).status(node1, node2,
125 return super(lfiles_repo, self).status(node1, node2,
124 match, listignored, listclean,
126 match, listignored, listclean,
125 listunknown, listsubrepos)
127 listunknown, listsubrepos)
@@ -948,4 +948,50 b' Symlink to a large largefile should beha'
948 $ test -L largelink
948 $ test -L largelink
949 $ cd ..
949 $ cd ..
950
950
951 test for pattern matching on 'hg status':
952 to boost performance, largefiles checks whether specified patterns are
953 related to largefiles in working directory (NOT to STANDIN) or not.
951
954
955 $ hg init statusmatch
956 $ cd statusmatch
957
958 $ mkdir -p a/b/c/d
959 $ echo normal > a/b/c/d/e.normal.txt
960 $ hg add a/b/c/d/e.normal.txt
961 $ echo large > a/b/c/d/e.large.txt
962 $ hg add --large a/b/c/d/e.large.txt
963 $ mkdir -p a/b/c/x
964 $ echo normal > a/b/c/x/y.normal.txt
965 $ hg add a/b/c/x/y.normal.txt
966 $ hg commit -m 'add files'
967 Invoking status precommit hook
968 A a/b/c/d/e.large.txt
969 A a/b/c/d/e.normal.txt
970 A a/b/c/x/y.normal.txt
971
972 (1) no pattern: no performance boost
973 $ hg status -A
974 C a/b/c/d/e.large.txt
975 C a/b/c/d/e.normal.txt
976 C a/b/c/x/y.normal.txt
977
978 (2) pattern not related to largefiles: performance boost
979 $ hg status -A a/b/c/x
980 C a/b/c/x/y.normal.txt
981
982 (3) pattern related to largefiles: no performance boost
983 $ hg status -A a/b/c/d
984 C a/b/c/d/e.large.txt
985 C a/b/c/d/e.normal.txt
986
987 (4) pattern related to STANDIN (not to largefiles): performance boost
988 $ hg status -A .hglf/a
989 C .hglf/a/b/c/d/e.large.txt
990
991 (5) mixed case: no performance boost
992 $ hg status -A a/b/c/x a/b/c/d
993 C a/b/c/d/e.large.txt
994 C a/b/c/d/e.normal.txt
995 C a/b/c/x/y.normal.txt
996
997 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now