[PATCH 30 of 41] basefilectx: move changectx from filectx

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


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376279762 18000
#      Sun Aug 11 22:56:02 2013 -0500
# Node ID fd088bd643f300091ca45961c81b88bafdf162eb
# Parent  a53c4c04f9f2e3907e71ad192b84190f0c31f199
basefilectx: move changectx from filectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -509,10 +509,12 @@
         return self._changectx.phase()
     def phasestr(self):
         return self._changectx.phasestr()
     def manifest(self):
         return self._changectx.manifest()
+    def changectx(self):
+        return self._changectx
 
 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,
@@ -565,13 +567,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 changectx(self):
-        return self._changectx
-
     def data(self):
         return self._filelog.read(self._filenode)
     def path(self):
         return self._path
     def size(self):


More information about the Mercurial-devel mailing list