Show More
@@ -611,7 +611,7 b' class dirstate(object):' | |||||
611 | dirsnotfound = [] |
|
611 | dirsnotfound = [] | |
612 | notfoundadd = dirsnotfound.append |
|
612 | notfoundadd = dirsnotfound.append | |
613 |
|
613 | |||
614 |
if |
|
614 | if not match.isexact() and self._checkcase: | |
615 | normalize = self._normalize |
|
615 | normalize = self._normalize | |
616 | else: |
|
616 | else: | |
617 | normalize = None |
|
617 | normalize = None | |
@@ -711,7 +711,7 b' class dirstate(object):' | |||||
711 | join = self._join |
|
711 | join = self._join | |
712 |
|
712 | |||
713 | exact = skipstep3 = False |
|
713 | exact = skipstep3 = False | |
714 |
if |
|
714 | if match.isexact(): # match.exact | |
715 | exact = True |
|
715 | exact = True | |
716 | dirignore = util.always # skip step 2 |
|
716 | dirignore = util.always # skip step 2 | |
717 | elif match.files() and not match.anypats(): # match.match, no patterns |
|
717 | elif match.files() and not match.anypats(): # match.match, no patterns | |
@@ -912,7 +912,7 b' class dirstate(object):' | |||||
912 | if match.always(): |
|
912 | if match.always(): | |
913 | return dmap.keys() |
|
913 | return dmap.keys() | |
914 | files = match.files() |
|
914 | files = match.files() | |
915 |
if match. |
|
915 | if match.isexact(): | |
916 | # fast path -- filter the other way around, since typically files is |
|
916 | # fast path -- filter the other way around, since typically files is | |
917 | # much smaller than dmap |
|
917 | # much smaller than dmap | |
918 | return [f for f in files if f in dmap] |
|
918 | return [f for f in files if f in dmap] |
@@ -164,7 +164,7 b' class manifestdict(object):' | |||||
164 | return self.copy() |
|
164 | return self.copy() | |
165 |
|
165 | |||
166 | files = match.files() |
|
166 | files = match.files() | |
167 |
if (len(files) < 100 and (match. |
|
167 | if (len(files) < 100 and (match.isexact() or | |
168 | (not match.anypats() and util.all(fn in self for fn in files)))): |
|
168 | (not match.anypats() and util.all(fn in self for fn in files)))): | |
169 | return self.intersectfiles(files) |
|
169 | return self.intersectfiles(files) | |
170 |
|
170 | |||
@@ -519,7 +519,7 b' class treemanifest(object):' | |||||
519 | return self.copy() |
|
519 | return self.copy() | |
520 |
|
520 | |||
521 | files = match.files() |
|
521 | files = match.files() | |
522 |
if (match. |
|
522 | if (match.isexact() or | |
523 | (not match.anypats() and util.all(fn in self for fn in files))): |
|
523 | (not match.anypats() and util.all(fn in self for fn in files))): | |
524 | return self.intersectfiles(files) |
|
524 | return self.intersectfiles(files) | |
525 |
|
525 |
@@ -171,6 +171,9 b' class match(object):' | |||||
171 | - optimization might be possible and necessary.''' |
|
171 | - optimization might be possible and necessary.''' | |
172 | return self._always |
|
172 | return self._always | |
173 |
|
173 | |||
|
174 | def isexact(self): | |||
|
175 | return self.matchfn == self.exact | |||
|
176 | ||||
174 | def exact(root, cwd, files): |
|
177 | def exact(root, cwd, files): | |
175 | return match(root, cwd, files, exact=True) |
|
178 | return match(root, cwd, files, exact=True) | |
176 |
|
179 |
General Comments 0
You need to be logged in to leave comments.
Login now