D243: obsmarker: rename precnode into prednode

lothiraldan (Boris Feld) phabricator at mercurial-scm.org
Wed Aug 9 13:19:46 EDT 2017


lothiraldan updated this revision to Diff 705.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D243?vs=699&id=705

REVISION DETAIL
  https://phab.mercurial-scm.org/D243

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -9,6 +9,7 @@
 
 from . import (
     phases,
+    util
 )
 
 class marker(object):
@@ -29,15 +30,21 @@
         return self._data == other._data
 
     def precnode(self):
-        """Precursor changeset node identifier"""
+        msg = ("'marker.precnode' is deprecated, "
+               "use 'marker.precnode'")
+        util.nouideprecwarn(msg, '4.4')
+        return self.prednode()
+
+    def prednode(self):
+        """Predecessor changeset node identifier"""
         return self._data[0]
 
     def succnodes(self):
         """List of successor changesets node identifiers"""
         return self._data[1]
 
     def parentnodes(self):
-        """Parents of the precursors (None if not recorded)"""
+        """Parents of the predecessors (None if not recorded)"""
         return self._data[5]
 
     def metadata(self):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1913,7 +1913,7 @@
     To be used by debug function."""
     if index is not None:
         fm.write('index', '%i ', index)
-    fm.write('precnode', '%s ', hex(marker.precnode()))
+    fm.write('precnode', '%s ', hex(marker.prednode()))
     succs = marker.succnodes()
     fm.condwrite(succs, 'succnodes', '%s ',
                  fm.formatlist(map(hex, succs), name='node'))



To: lothiraldan, #hg-reviewers, dsp
Cc: mercurial-devel


More information about the Mercurial-devel mailing list