diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -501,6 +501,8 @@ class basefilectx(object):
         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
@@ -557,8 +559,6 @@ class filectx(basefilectx):
         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):