Patchwork [30,of,41] basefilectx: move changectx from filectx

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

Comments

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

Patch

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