comparison mercurial/manifest.py @ 24448:55c449345b10

match: add isexact() method to hide internals Comparing a function reference seems bad.
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 29 Oct 2014 08:43:39 -0700
parents 1297480ed347
children bfb754050ccd
comparison
equal deleted inserted replaced
24447:d44d53bc9a1e 24448:55c449345b10
162 '''generate a new manifest filtered by the match argument''' 162 '''generate a new manifest filtered by the match argument'''
163 if match.always(): 163 if match.always():
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.matchfn == match.exact or 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
171 lm = manifestdict('') 171 lm = manifestdict('')
172 lm._lm = self._lm.filtercopy(match) 172 lm._lm = self._lm.filtercopy(match)
517 '''generate a new manifest filtered by the match argument''' 517 '''generate a new manifest filtered by the match argument'''
518 if match.always(): 518 if match.always():
519 return self.copy() 519 return self.copy()
520 520
521 files = match.files() 521 files = match.files()
522 if (match.matchfn == match.exact or 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
526 m = self.copy() 526 m = self.copy()
527 for fn in m.keys(): 527 for fn in m.keys():