[PATCH 25 of 41] basefilectx: move branch from filectx

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


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376279671 18000
#      Sun Aug 11 22:54:31 2013 -0500
# Node ID e87eae4d45ad7a044d4c57d69274fcf57dd4fae3
# Parent  304baff0b138716475430b47cf8fb2d417658a14
basefilectx: move branch from filectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -499,10 +499,12 @@
         return self._changectx.date()
     def files(self):
         return self._changectx.files()
     def description(self):
         return self._changectx.description()
+    def branch(self):
+        return self._changectx.branch()
 
 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,
@@ -555,12 +557,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 branch(self):
-        return self._changectx.branch()
     def extra(self):
         return self._changectx.extra()
     def phase(self):
         return self._changectx.phase()
     def phasestr(self):


More information about the Mercurial-devel mailing list