treemanifests: make _loadchildrensetlazy just call _loadlazy
authorspectral <spectral@google.com>
Tue, 02 Oct 2018 13:38:26 -0700
changeset 39982 19103e68a698
parent 39981 da0319e024c0
child 39983 3cacb74c3a22
treemanifests: make _loadchildrensetlazy just call _loadlazy This was suggested on the original review for _loadchildrensetlazy (D4370), it's taken me a while to get to it though. Differential Revision: https://phab.mercurial-scm.org/D4843
mercurial/manifest.py
--- a/mercurial/manifest.py	Tue Oct 02 13:37:12 2018 -0700
+++ b/mercurial/manifest.py	Tue Oct 02 13:38:26 2018 -0700
@@ -720,15 +720,9 @@
             return None
 
         todel = []
+        loadlazy = self._loadlazy
         for k in visit:
-            kslash = k + '/'
-            ld = self._lazydirs.get(kslash)
-            if ld:
-                path, node, readsubtree = ld
-                self._dirs[kslash] = readsubtree(path, node)
-                todel.append(kslash)
-        for kslash in todel:
-            del self._lazydirs[kslash]
+            loadlazy(k + '/')
         return visit
 
     def __len__(self):