changeset 30565:7fbc8a742b4d

manifest: expose the parents() method
author Mateusz Kwapich <mitrandir@fb.com>
date Thu, 17 Nov 2016 10:59:15 -0800
parents 07bcd1bf6151
children 46d2c8b23c33
files mercurial/manifest.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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