basectx: move sub from changectx
authorSean Farley <sean.michael.farley@gmail.com>
Mon, 05 Aug 2013 18:40:36 -0500
changeset 19562 389d7767630d
parent 19561 7806e63598b0
child 19563 87503cd824fa
basectx: move sub from changectx
mercurial/context.py
--- a/mercurial/context.py	Mon Aug 05 18:28:54 2013 -0500
+++ b/mercurial/context.py	Mon Aug 05 18:40:36 2013 -0500
@@ -119,6 +119,9 @@
         except error.LookupError:
             return ''
 
+    def sub(self, path):
+        return subrepo.subrepo(self, path)
+
 class changectx(basectx):
     """A changecontext object makes access to data related to a particular
     changeset convenient. It represents a read-only context already presnt in
@@ -380,9 +383,6 @@
             if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
                 yield fn
 
-    def sub(self, path):
-        return subrepo.subrepo(self, path)
-
     def match(self, pats=[], include=None, exclude=None, default='glob'):
         r = self._repo
         return matchmod.match(r.root, r.getcwd(), pats,