mercurial/context.py
changeset 19605 cf7322cb1c13
parent 19604 ef7c47e4002f
child 19606 284f91230c07
--- a/mercurial/context.py	Sun Aug 11 22:56:53 2013 -0500
+++ b/mercurial/context.py	Sun Aug 11 22:57:21 2013 -0500
@@ -538,6 +538,18 @@
 
         return True
 
+    def parents(self):
+        p = self._path
+        fl = self._filelog
+        pl = [(p, n, fl) for n in self._filelog.parents(self._filenode)]
+
+        r = self._filelog.renamed(self._filenode)
+        if r:
+            pl[0] = (r[0], r[1], None)
+
+        return [filectx(self._repo, p, fileid=n, filelog=l)
+                for p, n, l in pl if n != nullid]
+
 class filectx(basefilectx):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
@@ -623,18 +635,6 @@
                 pass
         return renamed
 
-    def parents(self):
-        p = self._path
-        fl = self._filelog
-        pl = [(p, n, fl) for n in self._filelog.parents(self._filenode)]
-
-        r = self._filelog.renamed(self._filenode)
-        if r:
-            pl[0] = (r[0], r[1], None)
-
-        return [filectx(self._repo, p, fileid=n, filelog=l)
-                for p, n, l in pl if n != nullid]
-
     def p1(self):
         return self.parents()[0]