D4844: treemanifests: skip extraneous check for item before calling _loadlazy

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3cacb74c3a22: treemanifests: skip extraneous check for item before calling _loadlazy (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4844?vs=11581&id=11585

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

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
@@ -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



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


More information about the Mercurial-devel mailing list