Show More
@@ -27,7 +27,7 b' def composelargefilematcher(match, manif' | |||
|
27 | 27 | m = copy.copy(match) |
|
28 | 28 | lfile = lambda f: lfutil.standin(f) in manifest |
|
29 | 29 | m._files = filter(lfile, m._files) |
|
30 |
m._f |
|
|
30 | m._fileroots = set(m._files) | |
|
31 | 31 | m._always = False |
|
32 | 32 | origmatchfn = m.matchfn |
|
33 | 33 | m.matchfn = lambda f: lfile(f) and origmatchfn(f) |
@@ -42,7 +42,7 b' def composenormalfilematcher(match, mani' | |||
|
42 | 42 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
|
43 | 43 | manifest or f in excluded) |
|
44 | 44 | m._files = filter(notlfile, m._files) |
|
45 |
m._f |
|
|
45 | m._fileroots = set(m._files) | |
|
46 | 46 | m._always = False |
|
47 | 47 | origmatchfn = m.matchfn |
|
48 | 48 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) |
@@ -358,7 +358,7 b' def overridelog(orig, ui, repo, *pats, *' | |||
|
358 | 358 | and repo.wvfs.isdir(standin): |
|
359 | 359 | m._files.append(standin) |
|
360 | 360 | |
|
361 |
m._f |
|
|
361 | m._fileroots = set(m._files) | |
|
362 | 362 | m._always = False |
|
363 | 363 | origmatchfn = m.matchfn |
|
364 | 364 | def lfmatchfn(f): |
@@ -626,7 +626,7 b' def overridecopy(orig, ui, repo, pats, o' | |||
|
626 | 626 | m = copy.copy(match) |
|
627 | 627 | lfile = lambda f: lfutil.standin(f) in manifest |
|
628 | 628 | m._files = [lfutil.standin(f) for f in m._files if lfile(f)] |
|
629 |
m._f |
|
|
629 | m._fileroots = set(m._files) | |
|
630 | 630 | origmatchfn = m.matchfn |
|
631 | 631 | m.matchfn = lambda f: (lfutil.isstandin(f) and |
|
632 | 632 | (f in manifest) and |
@@ -742,7 +742,7 b' def overriderevert(orig, ui, repo, ctx, ' | |||
|
742 | 742 | return f |
|
743 | 743 | m._files = [tostandin(f) for f in m._files] |
|
744 | 744 | m._files = [f for f in m._files if f is not None] |
|
745 |
m._f |
|
|
745 | m._fileroots = set(m._files) | |
|
746 | 746 | origmatchfn = m.matchfn |
|
747 | 747 | def matchfn(f): |
|
748 | 748 | if lfutil.isstandin(f): |
@@ -123,7 +123,7 b' class match(object):' | |||
|
123 | 123 | return True |
|
124 | 124 | |
|
125 | 125 | self.matchfn = m |
|
126 |
self._f |
|
|
126 | self._fileroots = set(self._files) | |
|
127 | 127 | |
|
128 | 128 | def __call__(self, fn): |
|
129 | 129 | return self.matchfn(fn) |
@@ -171,17 +171,17 b' class match(object):' | |||
|
171 | 171 | |
|
172 | 172 | @propertycache |
|
173 | 173 | def _dirs(self): |
|
174 |
return set(util.dirs(self._f |
|
|
174 | return set(util.dirs(self._fileroots)) | set(['.']) | |
|
175 | 175 | |
|
176 | 176 | def visitdir(self, dir): |
|
177 |
return (not self._f |
|
|
178 |
dir in self._f |
|
|
179 |
any(parentdir in self._f |
|
|
177 | return (not self._fileroots or '.' in self._fileroots or | |
|
178 | dir in self._fileroots or dir in self._dirs or | |
|
179 | any(parentdir in self._fileroots | |
|
180 | 180 | for parentdir in util.finddirs(dir))) |
|
181 | 181 | |
|
182 | 182 | def exact(self, f): |
|
183 | 183 | '''Returns True if f is in .files().''' |
|
184 |
return f in self._f |
|
|
184 | return f in self._fileroots | |
|
185 | 185 | |
|
186 | 186 | def anypats(self): |
|
187 | 187 | '''Matcher uses patterns or include/exclude.''' |
@@ -276,7 +276,7 b' class narrowmatcher(match):' | |||
|
276 | 276 | if f.startswith(path + "/")] |
|
277 | 277 | self._anypats = matcher._anypats |
|
278 | 278 | self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) |
|
279 |
self._f |
|
|
279 | self._fileroots = set(self._files) | |
|
280 | 280 | |
|
281 | 281 | def abs(self, f): |
|
282 | 282 | return self._matcher.abs(self._path + "/" + f) |
@@ -303,7 +303,7 b' class icasefsmatcher(match):' | |||
|
303 | 303 | # m.exact(file) must be based off of the actual user input, otherwise |
|
304 | 304 | # inexact case matches are treated as exact, and not noted without -v. |
|
305 | 305 | if self._files: |
|
306 |
self._f |
|
|
306 | self._fileroots = set(_roots(self._kp)) | |
|
307 | 307 | |
|
308 | 308 | def _normalize(self, patterns, default, root, cwd, auditor): |
|
309 | 309 | self._kp = super(icasefsmatcher, self)._normalize(patterns, default, |
General Comments 0
You need to be logged in to leave comments.
Login now