diff mercurial/revset.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 b6ef1395d77f
children d37d221334be
line wrap: on
line diff
--- a/mercurial/revset.py	Sat Jun 02 15:35:53 2012 -0500
+++ b/mercurial/revset.py	Fri Jun 01 17:05:31 2012 -0700
@@ -5,7 +5,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import re, collections
+import re
 import parser, util, error, discovery, hbisect, phases
 import node
 import bookmarks as bookmarksmod
@@ -17,7 +17,7 @@
     """Like revlog.ancestors(), but supports followfirst."""
     cut = followfirst and 1 or None
     cl = repo.changelog
-    visit = collections.deque(revs)
+    visit = util.deque(revs)
     seen = set([node.nullrev])
     while visit:
         for parent in cl.parentrevs(visit.popleft())[:cut]: