Patchwork [6,of,7] obsmarkers: add a `parentnodes` method to retrieve parents information

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 19, 2014, 12:49 a.m.
Message ID <c30352bcad3f7b357540.1408409376@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5501/
State Changes Requested
Headers show

Comments

Pierre-Yves David - Aug. 19, 2014, 12:49 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1408407267 25200
#      Mon Aug 18 17:14:27 2014 -0700
# Node ID c30352bcad3f7b3575402dde739f3708135c3b0c
# Parent  bfa06f4858e3e088f84df0cda1ad78bbe9a01132
obsmarkers: add a `parentnodes` method to retrieve parents information

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -226,10 +226,14 @@  class marker(object):
 
     def succnodes(self):
         """List of successor changesets node identifiers"""
         return self._data[1]
 
+    def parentnodes(self):
+        """Parents of the precursors (None if not recorded)"""
+        return self._data[5]
+
     def metadata(self):
         """Decoded metadata dictionary"""
         if self._decodedmeta is None:
             self._decodedmeta = decodemeta(self._data[3])
         return self._decodedmeta