treemanifests: skip extraneous check for item before calling _loadlazy
authorspectral <spectral@google.com>
Tue, 02 Oct 2018 13:41:00 -0700
changeset 39983 3cacb74c3a22
parent 39982 19103e68a698
child 39984 731961d972ba
treemanifests: skip extraneous check for item before calling _loadlazy Differential Revision: https://phab.mercurial-scm.org/D4844
mercurial/manifest.py
--- 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