##// END OF EJS Templates
localrepo: optimize internode status calls using match.always...
Jesse Glick -
r16645:9a21fc2c default
parent child Browse files
Show More
@@ -1333,6 +1333,8 b' class localrepository(repo.repository):'
1333
1333
1334 def mfmatches(ctx):
1334 def mfmatches(ctx):
1335 mf = ctx.manifest().copy()
1335 mf = ctx.manifest().copy()
1336 if match.always():
1337 return mf
1336 for fn in mf.keys():
1338 for fn in mf.keys():
1337 if not match(fn):
1339 if not match(fn):
1338 del mf[fn]
1340 del mf[fn]
@@ -118,6 +118,8 b' class match(object):'
118 return self._files
118 return self._files
119 def anypats(self):
119 def anypats(self):
120 return self._anypats
120 return self._anypats
121 def always(self):
122 return False
121
123
122 class exact(match):
124 class exact(match):
123 def __init__(self, root, cwd, files):
125 def __init__(self, root, cwd, files):
@@ -126,6 +128,8 b' class exact(match):'
126 class always(match):
128 class always(match):
127 def __init__(self, root, cwd):
129 def __init__(self, root, cwd):
128 match.__init__(self, root, cwd, [])
130 match.__init__(self, root, cwd, [])
131 def always(self):
132 return True
129
133
130 class narrowmatcher(match):
134 class narrowmatcher(match):
131 """Adapt a matcher to work on a subdirectory only.
135 """Adapt a matcher to work on a subdirectory only.
General Comments 0
You need to be logged in to leave comments. Login now