##// END OF EJS Templates
treemanifests: skip extraneous check for item before calling _loadlazy...
spectral -
r40019:3cacb74c default
parent child Browse files
Show More
@@ -817,8 +817,7 b' class treemanifest(object):'
817 self._load()
817 self._load()
818 dir, subpath = _splittopdir(f)
818 dir, subpath = _splittopdir(f)
819 if dir:
819 if dir:
820 if dir in self._lazydirs:
820 self._loadlazy(dir)
821 self._loadlazy(dir)
822
821
823 if dir not in self._dirs:
822 if dir not in self._dirs:
824 return False
823 return False
@@ -831,8 +830,7 b' class treemanifest(object):'
831 self._load()
830 self._load()
832 dir, subpath = _splittopdir(f)
831 dir, subpath = _splittopdir(f)
833 if dir:
832 if dir:
834 if dir in self._lazydirs:
833 self._loadlazy(dir)
835 self._loadlazy(dir)
836
834
837 if dir not in self._dirs:
835 if dir not in self._dirs:
838 return default
836 return default
@@ -844,8 +842,7 b' class treemanifest(object):'
844 self._load()
842 self._load()
845 dir, subpath = _splittopdir(f)
843 dir, subpath = _splittopdir(f)
846 if dir:
844 if dir:
847 if dir in self._lazydirs:
845 self._loadlazy(dir)
848 self._loadlazy(dir)
849
846
850 return self._dirs[dir].__getitem__(subpath)
847 return self._dirs[dir].__getitem__(subpath)
851 else:
848 else:
@@ -855,8 +852,7 b' class treemanifest(object):'
855 self._load()
852 self._load()
856 dir, subpath = _splittopdir(f)
853 dir, subpath = _splittopdir(f)
857 if dir:
854 if dir:
858 if dir in self._lazydirs:
855 self._loadlazy(dir)
859 self._loadlazy(dir)
860
856
861 if dir not in self._dirs:
857 if dir not in self._dirs:
862 return ''
858 return ''
@@ -870,8 +866,7 b' class treemanifest(object):'
870 self._load()
866 self._load()
871 dir, subpath = _splittopdir(f)
867 dir, subpath = _splittopdir(f)
872 if dir:
868 if dir:
873 if dir in self._lazydirs:
869 self._loadlazy(dir)
874 self._loadlazy(dir)
875
870
876 return self._dirs[dir].find(subpath)
871 return self._dirs[dir].find(subpath)
877 else:
872 else:
@@ -881,8 +876,7 b' class treemanifest(object):'
881 self._load()
876 self._load()
882 dir, subpath = _splittopdir(f)
877 dir, subpath = _splittopdir(f)
883 if dir:
878 if dir:
884 if dir in self._lazydirs:
879 self._loadlazy(dir)
885 self._loadlazy(dir)
886
880
887 self._dirs[dir].__delitem__(subpath)
881 self._dirs[dir].__delitem__(subpath)
888 # If the directory is now empty, remove it
882 # If the directory is now empty, remove it
@@ -899,8 +893,7 b' class treemanifest(object):'
899 self._load()
893 self._load()
900 dir, subpath = _splittopdir(f)
894 dir, subpath = _splittopdir(f)
901 if dir:
895 if dir:
902 if dir in self._lazydirs:
896 self._loadlazy(dir)
903 self._loadlazy(dir)
904 if dir not in self._dirs:
897 if dir not in self._dirs:
905 self._dirs[dir] = treemanifest(self._subpath(dir))
898 self._dirs[dir] = treemanifest(self._subpath(dir))
906 self._dirs[dir].__setitem__(subpath, n)
899 self._dirs[dir].__setitem__(subpath, n)
@@ -921,8 +914,7 b' class treemanifest(object):'
921 self._load()
914 self._load()
922 dir, subpath = _splittopdir(f)
915 dir, subpath = _splittopdir(f)
923 if dir:
916 if dir:
924 if dir in self._lazydirs:
917 self._loadlazy(dir)
925 self._loadlazy(dir)
926 if dir not in self._dirs:
918 if dir not in self._dirs:
927 self._dirs[dir] = treemanifest(self._subpath(dir))
919 self._dirs[dir] = treemanifest(self._subpath(dir))
928 self._dirs[dir].setflag(subpath, flags)
920 self._dirs[dir].setflag(subpath, flags)
@@ -993,8 +985,7 b' class treemanifest(object):'
993 self._load()
985 self._load()
994 topdir, subdir = _splittopdir(dir)
986 topdir, subdir = _splittopdir(dir)
995 if topdir:
987 if topdir:
996 if topdir in self._lazydirs:
988 self._loadlazy(topdir)
997 self._loadlazy(topdir)
998 if topdir in self._dirs:
989 if topdir in self._dirs:
999 return self._dirs[topdir].hasdir(subdir)
990 return self._dirs[topdir].hasdir(subdir)
1000 return False
991 return False
General Comments 0
You need to be logged in to leave comments. Login now