Mercurial > hg
changeset 24550:4daae7edf166
treemanifest: remove treemanifest._intersectfiles()
In preparation for the optimization in the following commit, this commit
removes treemanifest.matches()'s call to _intersectfiles(), and removes
_intersectfiles() itself since it's unused at this point.
author | Drew Gottlieb <drgott@google.com> |
---|---|
date | Fri, 27 Mar 2015 13:16:13 -0700 |
parents | bcf0de51326e |
children | 4fdf5eac5b39 |
files | mercurial/manifest.py |
diffstat | 1 files changed, 0 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/manifest.py Mon Mar 30 11:58:39 2015 -0700 +++ b/mercurial/manifest.py Fri Mar 27 13:16:13 2015 -0700 @@ -480,19 +480,6 @@ copy._flags = dict.copy(self._flags) return copy - def _intersectfiles(self, files): - '''make a new treemanifest with the intersection of self with files - - The algorithm assumes that files is much smaller than self.''' - ret = treemanifest() - for fn in files: - if fn in self: - ret[fn] = self[fn] - flags = self.flags(fn) - if flags: - ret.setflag(fn, flags) - return ret - def filesnotin(self, m2): '''Set of files in this manifest that are not in the other''' files = set() @@ -531,11 +518,6 @@ if match.always(): return self.copy() - files = match.files() - if (match.isexact() or - (not match.anypats() and util.all(fn in self for fn in files))): - return self._intersectfiles(files) - m = self.copy() for fn in m.keys(): if not match(fn):