diff mercurial/patch.py @ 16834:cafd8a8fb713

util: subclass deque for Python 2.4 backwards compatibility It turns out that Python 2.4's deque type is lacking a remove method. We can't implement remove in terms of find, because it doesn't have find either.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 01 Jun 2012 17:05:31 -0700
parents 8abee656e14c
children e51d4aedace9
line wrap: on
line diff
--- a/mercurial/patch.py	Sat Jun 02 15:35:53 2012 -0500
+++ b/mercurial/patch.py	Fri Jun 01 17:05:31 2012 -0700
@@ -12,7 +12,7 @@
 from i18n import _
 from node import hex, nullid, short
 import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error
-import collections, context
+import context
 
 gitre = re.compile('diff --git a/(.*) b/(.*)')
 
@@ -1597,7 +1597,7 @@
 
     def lrugetfilectx():
         cache = {}
-        order = collections.deque()
+        order = util.deque()
         def getfilectx(f, ctx):
             fctx = ctx.filectx(f, filelog=cache.get(f))
             if f not in cache: