manifest: call m1.load and m2.load before writing a subtree
As part of refactoring the manifest, certain test cases started failing because
writesubtrees was called with p1 and p2 manifests that had not been loaded (so
accessing m1._dirs resulted in an empty set). Let's call _load on these before
attempting to access _dirs.
This was caught by tests when future patches were applied.
--- a/mercurial/manifest.py Tue Aug 30 13:13:50 2016 -0400
+++ b/mercurial/manifest.py Mon Aug 29 17:48:14 2016 -0700
@@ -882,6 +882,8 @@
def writesubtrees(self, m1, m2, writesubtree):
self._load() # for consistency; should never have any effect here
+ m1._load()
+ m2._load()
emptytree = treemanifest()
for d, subm in self._dirs.iteritems():
subp1 = m1._dirs.get(d, emptytree)._node