##// END OF EJS Templates
treemanifest: avoid loading everything just to get their nodeid...
Kyle Lippincott -
r39554:c29548ba default
parent child Browse files
Show More
@@ -1177,14 +1177,15 b' class treemanifest(object):'
1177 m1._load()
1177 m1._load()
1178 m2._load()
1178 m2._load()
1179 emptytree = treemanifest()
1179 emptytree = treemanifest()
1180 # OPT: Do we really need to load everything? Presumably things in lazy
1180 def getnode(m, d):
1181 # aren't dirty and don't need to be written.
1181 ld = m._lazydirs.get(d)
1182 self._loadalllazy()
1182 if ld:
1183 m1._loadalllazy()
1183 return ld[1]
1184 m2._loadalllazy()
1184 return m._dirs.get(d, emptytree)._node
1185
1185 for d, subm in self._dirs.iteritems():
1186 for d, subm in self._dirs.iteritems():
1186 subp1 = m1._dirs.get(d, emptytree)._node
1187 subp1 = getnode(m1, d)
1187 subp2 = m2._dirs.get(d, emptytree)._node
1188 subp2 = getnode(m2, d)
1188 if subp1 == nullid:
1189 if subp1 == nullid:
1189 subp1, subp2 = subp2, subp1
1190 subp1, subp2 = subp2, subp1
1190 writesubtree(subm, subp1, subp2)
1191 writesubtree(subm, subp1, subp2)
General Comments 0
You need to be logged in to leave comments. Login now