mercurial/manifest.py
changeset 24528 b538ae24aa97
parent 24527 8aead3bc5ff8
child 24550 4daae7edf166
--- a/mercurial/manifest.py	Fri Mar 27 17:07:24 2015 -0700
+++ b/mercurial/manifest.py	Fri Mar 27 20:41:30 2015 -0700
@@ -613,7 +613,21 @@
             return treemanifest('', data)
         return manifestdict(data)
 
+    def _slowreaddelta(self, node):
+        r0 = self.deltaparent(self.rev(node))
+        m0 = self.read(self.node(r0))
+        m1 = self.read(node)
+        md = self._newmanifest()
+        for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems():
+            if n1:
+                md[f] = n1
+                if fl1:
+                    md.setflag(f, fl1)
+        return md
+
     def readdelta(self, node):
+        if self._usemanifestv2:
+            return self._slowreaddelta(node)
         r = self.rev(node)
         d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r))
         return self._newmanifest(d)