Patchwork [07,of,36] context: change _node to node() in hex

mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <18155de59edb65e797b5.1375899187@laptop.local>
Download mbox | patch
Permalink /patch/2024/
State Superseded
Commit 6041ebaf8151625f51bcad014fe5fadc106960dc
Delegated to: Augie Fackler
Headers show


Sean Farley - Aug. 7, 2013, 6:13 p.m.
# HG changeset patch
# User Sean Farley <>
# Date 1375480213 18000
#      Fri Aug 02 16:50:13 2013 -0500
# Node ID 18155de59edb65e797b585c23ae0a70d04eae7c7
# Parent  499a421b6679441120ceba566342115e9ae0b633
context: change _node to node() in hex

This allows a child class to overload the node() function and still share the
same code for hex().


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -41,11 +41,11 @@ 
     def rev(self):
         return self._rev
     def node(self):
         return self._node
     def hex(self):
-        return hex(self._node)
+        return hex(self.node())
 class changectx(context):
     """A changecontext object makes access to data related to a particular
     changeset convenient. It represents a read-only context already presnt in
     the repo."""