[PATCH 17 of 41] basefilectx: move rev from filectx

Sean Farley sean.michael.farley at gmail.com
Mon Aug 12 16:27:13 UTC 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376279490 18000
#      Sun Aug 11 22:51:30 2013 -0500
# Node ID f58609f89fd89d19eb220f3613e520e7c57091c2
# Parent  9c1d247bd0fbbee0d9e88d01426d380612a1cf8f
basefilectx: move rev from filectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -483,10 +483,12 @@
         return self._filenode
     def flags(self):
         return self._changectx.flags(self._path)
     def filelog(self):
         return self._filelog
+    def rev(self):
+        return self._changeid
 
 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,
@@ -539,12 +541,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 rev(self):
-        return self._changeid
     def linkrev(self):
         return self._filelog.linkrev(self._filerev)
     def node(self):
         return self._changectx.node()
     def hex(self):



More information about the Mercurial-devel mailing list