diff mercurial/treediscovery.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 107a3270a24a
children d2704c48f417
line wrap: on
line diff
--- a/mercurial/treediscovery.py	Sat Jun 02 15:35:53 2012 -0500
+++ b/mercurial/treediscovery.py	Fri Jun 01 17:05:31 2012 -0700
@@ -7,7 +7,7 @@
 
 from node import nullid, short
 from i18n import _
-import util, error, collections
+import util, error
 
 def findcommonincoming(repo, remote, heads=None, force=False):
     """Return a tuple (common, fetch, heads) used to identify the common
@@ -56,7 +56,7 @@
     # a 'branch' here is a linear segment of history, with four parts:
     # head, root, first parent, second parent
     # (a branch always has two parents (or none) by definition)
-    unknown = collections.deque(remote.branches(unknown))
+    unknown = util.deque(remote.branches(unknown))
     while unknown:
         r = []
         while unknown: