[PATCH 14 of 41] basefilectx: move filenode from filectx

Sean Farley sean.michael.farley at gmail.com
Mon Aug 12 11:27:10 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376279437 18000
#      Sun Aug 11 22:50:37 2013 -0500
# Node ID 5951512fdde230d60b9ca808bd40d402363ae560
# Parent  194e36f0a102f79df64e9cccae7b04aae0a4a24a
basefilectx: move filenode from filectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -477,10 +477,12 @@
     def __ne__(self, other):
         return not (self == other)
 
     def filerev(self):
         return self._filerev
+    def filenode(self):
+        return self._filenode
 
 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,
@@ -533,12 +535,10 @@
         '''opens an arbitrary revision of the file without
         opening a new filelog'''
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog)
 
-    def filenode(self):
-        return self._filenode
     def flags(self):
         return self._changectx.flags(self._path)
     def filelog(self):
         return self._filelog
     def rev(self):


More information about the Mercurial-devel mailing list