[PATCH 13 of 41] basefilectx: move filerev from filectx

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


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376279415 18000
#      Sun Aug 11 22:50:15 2013 -0500
# Node ID 194e36f0a102f79df64e9cccae7b04aae0a4a24a
# Parent  41e53a0a440591e57cf939938a31f59217ef4084
basefilectx: move filerev from filectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -475,10 +475,13 @@
             return False
 
     def __ne__(self, other):
         return not (self == other)
 
+    def filerev(self):
+        return self._filerev
+
 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,
                  filelog=None, changectx=None):
@@ -530,12 +533,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 filerev(self):
-        return self._filerev
     def filenode(self):
         return self._filenode
     def flags(self):
         return self._changectx.flags(self._path)
     def filelog(self):


More information about the Mercurial-devel mailing list