Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 19544:74924fa3236d
basectx: change _node to node() in hex
This allows a child class to overload the node() function and still share the
same code for hex().
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Fri, 02 Aug 2013 16:50:13 -0500 |
parents | 18f4951222f4 |
children | 5af7045b0b18 |
comparison
equal
deleted
inserted
replaced
19543:18f4951222f4 | 19544:74924fa3236d |
---|---|
41 def rev(self): | 41 def rev(self): |
42 return self._rev | 42 return self._rev |
43 def node(self): | 43 def node(self): |
44 return self._node | 44 return self._node |
45 def hex(self): | 45 def hex(self): |
46 return hex(self._node) | 46 return hex(self.node()) |
47 | 47 |
48 class changectx(basectx): | 48 class changectx(basectx): |
49 """A changecontext object makes access to data related to a particular | 49 """A changecontext object makes access to data related to a particular |
50 changeset convenient. It represents a read-only context already presnt in | 50 changeset convenient. It represents a read-only context already presnt in |
51 the repo.""" | 51 the repo.""" |