Mercurial > hg
changeset 39983:3cacb74c3a22
treemanifests: skip extraneous check for item before calling _loadlazy
Differential Revision: https://phab.mercurial-scm.org/D4844
author | spectral <spectral@google.com> |
---|---|
date | Tue, 02 Oct 2018 13:41:00 -0700 |
parents | 19103e68a698 |
children | 731961d972ba |
files | mercurial/manifest.py |
diffstat | 1 files changed, 9 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/manifest.py Tue Oct 02 13:38:26 2018 -0700 +++ b/mercurial/manifest.py Tue Oct 02 13:41:00 2018 -0700 @@ -817,8 +817,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) if dir not in self._dirs: return False @@ -831,8 +830,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) if dir not in self._dirs: return default @@ -844,8 +842,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) return self._dirs[dir].__getitem__(subpath) else: @@ -855,8 +852,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) if dir not in self._dirs: return '' @@ -870,8 +866,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) return self._dirs[dir].find(subpath) else: @@ -881,8 +876,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) self._dirs[dir].__delitem__(subpath) # If the directory is now empty, remove it @@ -899,8 +893,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) if dir not in self._dirs: self._dirs[dir] = treemanifest(self._subpath(dir)) self._dirs[dir].__setitem__(subpath, n) @@ -921,8 +914,7 @@ self._load() dir, subpath = _splittopdir(f) if dir: - if dir in self._lazydirs: - self._loadlazy(dir) + self._loadlazy(dir) if dir not in self._dirs: self._dirs[dir] = treemanifest(self._subpath(dir)) self._dirs[dir].setflag(subpath, flags) @@ -993,8 +985,7 @@ self._load() topdir, subdir = _splittopdir(dir) if topdir: - if topdir in self._lazydirs: - self._loadlazy(topdir) + self._loadlazy(topdir) if topdir in self._dirs: return self._dirs[topdir].hasdir(subdir) return False