D4842: treemanifests: make _loadlazy tolerate item not on _lazydirs

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Tue Oct 2 19:12:43 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGda0319e024c0: treemanifests: make _loadlazy tolerate item not on _lazydirs (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4842?vs=11579&id=11583

REVISION DETAIL
  https://phab.mercurial-scm.org/D4842

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -706,9 +706,11 @@
         self._lazydirs = {}
 
     def _loadlazy(self, d):
-        path, node, readsubtree = self._lazydirs[d]
-        self._dirs[d] = readsubtree(path, node)
-        del self._lazydirs[d]
+        v = self._lazydirs.get(d)
+        if v:
+            path, node, readsubtree = v
+            self._dirs[d] = readsubtree(path, node)
+            del self._lazydirs[d]
 
     def _loadchildrensetlazy(self, visit):
         if not visit:



To: spectral, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list