Patchwork [20,of,41] basefilectx: move hex from filectx

mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <ee00cb4befa921289d58.1376324836@laptop.local>
Download mbox | patch
Permalink /patch/2148/
State Accepted
Commit 04fbc85f870a102862b1106296e4589c2c1cee3d
Headers show


Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <>
# Date 1376279603 18000
#      Sun Aug 11 22:53:23 2013 -0500
# Node ID ee00cb4befa921289d58715484f660039cf8c9a4
# Parent  2709648f64a6a01b7584a4768612fa61fe99da2f
basefilectx: move hex from filectx

We also change the function call to use the hex method of its change context
so that it mirrors other such method calls.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -489,10 +489,12 @@ 
         return self._changeid
     def linkrev(self):
         return self._filelog.linkrev(self._filerev)
     def node(self):
         return self._changectx.node()
+    def hex(self):
+        return self._changectx.hex()
 class filectx(basefilectx):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
     def __init__(self, repo, path, changeid=None, fileid=None,
@@ -545,12 +547,10 @@ 
         '''opens an arbitrary revision of the file without
         opening a new filelog'''
         return filectx(self._repo, self._path, fileid=fileid,
-    def hex(self):
-        return hex(self.node())
     def user(self):
         return self._changectx.user()
     def date(self):
     def files(self):