Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/manifest.py @ 25151:6eb4bdad198f
cleanup: use __builtins__.all instead of util.all
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 16 May 2015 14:34:19 -0400 |
parents | 49c583ca48c4 |
children | bf6b476f3b36 |
comparison
equal
deleted
inserted
replaced
25150:d28cc89d92f0 | 25151:6eb4bdad198f |
---|---|
217 def _filesfastpath(self, match): | 217 def _filesfastpath(self, match): |
218 '''Checks whether we can correctly and quickly iterate over matcher | 218 '''Checks whether we can correctly and quickly iterate over matcher |
219 files instead of over manifest files.''' | 219 files instead of over manifest files.''' |
220 files = match.files() | 220 files = match.files() |
221 return (len(files) < 100 and (match.isexact() or | 221 return (len(files) < 100 and (match.isexact() or |
222 (not match.anypats() and util.all(fn in self for fn in files)))) | 222 (not match.anypats() and all(fn in self for fn in files)))) |
223 | 223 |
224 def walk(self, match): | 224 def walk(self, match): |
225 '''Generates matching file names. | 225 '''Generates matching file names. |
226 | 226 |
227 Equivalent to manifest.matches(match).iterkeys(), but without creating | 227 Equivalent to manifest.matches(match).iterkeys(), but without creating |
463 size += m.__len__() | 463 size += m.__len__() |
464 return size | 464 return size |
465 | 465 |
466 def _isempty(self): | 466 def _isempty(self): |
467 return (not self._files and (not self._dirs or | 467 return (not self._files and (not self._dirs or |
468 util.all(m._isempty() for m in self._dirs.values()))) | 468 all(m._isempty() for m in self._dirs.values()))) |
469 | 469 |
470 def __str__(self): | 470 def __str__(self): |
471 return ('<treemanifest dir=%s, node=%s>' % | 471 return ('<treemanifest dir=%s, node=%s>' % |
472 (self._dir, revlog.hex(self._node))) | 472 (self._dir, revlog.hex(self._node))) |
473 | 473 |