changeset 20236:d0097d5818f9

context: drop caching 'copies' method The 'copies' method has no test coverage and calls copies.pathcopies with an incorrect number of parameters and is thus (fortunately) not used. Kill it.
author Mads Kiilerich <madski@unity3d.com>
date Sat, 16 Nov 2013 15:46:29 -0500
parents a602d2aca8bf
children 0d32dd60016c
files mercurial/context.py
diffstat 1 files changed, 0 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Tue Nov 19 12:43:29 2013 -0800
+++ b/mercurial/context.py	Sat Nov 16 15:46:29 2013 -0500
@@ -8,7 +8,6 @@
 from node import nullid, nullrev, short, hex, bin
 from i18n import _
 import ancestor, mdiff, error, util, scmutil, subrepo, patch, encoding, phases
-import copies
 import match as matchmod
 import os, errno, stat
 import obsolete as obsmod
@@ -737,14 +736,6 @@
             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."""