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

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 19, 2014, 10:46 p.m.
Message ID <0d7b583134d03f42addf.1408488405@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5522/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 19, 2014, 10:46 p.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 0d7b583134d03f42addf4c11a0132a36e8ad2420
# Parent  9c305df675f85efb5e9e0035a787c24052bd07d5
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
@@ -239,10 +239,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