Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hbisect.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 | e7cfe3587ea4 d057e92dadfc |
line wrap: on
line diff
--- a/mercurial/hbisect.py Sat Jun 02 15:35:53 2012 -0500 +++ b/mercurial/hbisect.py Fri Jun 01 17:05:31 2012 -0700 @@ -11,7 +11,7 @@ import os, error from i18n import _ from node import short, hex -import collections, util +import util def bisect(changelog, state): """find the next node (if any) for testing during a bisect search. @@ -69,7 +69,7 @@ # build children dict children = {} - visit = collections.deque([badrev]) + visit = util.deque([badrev]) candidates = [] while visit: rev = visit.popleft()