changeset 19611:bae0493b6dc0

basefilectx: move copies from filectx
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 11 Aug 2013 23:06:10 -0500
parents 0670422d58c6
children df54cc67b91b
files mercurial/context.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sun Aug 11 23:05:50 2013 -0500
+++ b/mercurial/context.py	Sun Aug 11 23:06:10 2013 -0500
@@ -722,6 +722,14 @@
             c = visit.pop(max(visit))
             yield c
 
+    def copies(self, c2):
+        if not util.safehasattr(self, "_copycache"):
+            self._copycache = {}
+        sc2 = str(c2)
+        if sc2 not in self._copycache:
+            self._copycache[sc2] = copies.pathcopies(c2)
+        return self._copycache[sc2]
+
 class filectx(basefilectx):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
@@ -813,14 +821,6 @@
         return [filectx(self._repo, self._path, fileid=x,
                         filelog=self._filelog) for x in c]
 
-    def copies(self, c2):
-        if not util.safehasattr(self, "_copycache"):
-            self._copycache = {}
-        sc2 = str(c2)
-        if sc2 not in self._copycache:
-            self._copycache[sc2] = copies.pathcopies(c2)
-        return self._copycache[sc2]
-
 class workingctx(basectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.