manifest: expose the parents() method
authorMateusz Kwapich <mitrandir@fb.com>
Thu, 17 Nov 2016 10:59:15 -0800
changeset 30565 7fbc8a742b4d
parent 30564 07bcd1bf6151
child 30566 46d2c8b23c33
manifest: expose the parents() method
mercurial/manifest.py
--- a/mercurial/manifest.py	Mon Nov 28 21:07:51 2016 -0800
+++ b/mercurial/manifest.py	Thu Nov 17 10:59:15 2016 -0800
@@ -1381,6 +1381,10 @@
         memmf._manifestdict = self.read().copy()
         return memmf
 
+    @propertycache
+    def parents(self):
+        return self._revlog().parents(self._node)
+
     def read(self):
         if not self._data:
             if self._node == revlog.nullid:
@@ -1515,6 +1519,10 @@
         memmf._treemanifest = self.read().copy()
         return memmf
 
+    @propertycache
+    def parents(self):
+        return self._revlog().parents(self._node)
+
     def readdelta(self, shallow=False):
         '''Returns a manifest containing just the entries that are present
         in this manifest, but not in its p1 manifest. This is efficient to read