# HG changeset patch # User Mateusz Kwapich <mitran...@fb.com> # Date 1479409155 28800 # Thu Nov 17 10:59:15 2016 -0800 # Node ID 7dfd4c184ee087f2c05e1bdae8a10ccefbff7a92 # Parent 96f2f50d923f94c23999df198ff16409e7539af8 manifest: expose the parents() method
diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -1381,6 +1381,10 @@ class manifestctx(object): 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 @@ class treemanifestctx(object): 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 _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel