Patchwork [13,of,41] basefilectx: move filerev from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <194e36f0a102f79df64e.1376324829@laptop.local>
Download mbox | patch
Permalink /patch/2140/
State Accepted
Commit fe300e63c28cf208f339ee63d2001c956ef472de
Headers show

Comments

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

Patch

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):