Mercurial > public > mercurial-scm > hg
comparison mercurial/hbisect.py @ 25113:0ca8410ea345
util: drop alias for collections.deque
Now that util.deque is just an alias for collections.deque, let's just
remove it.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 16 May 2015 11:28:04 -0700 |
parents | 7cc77030c557 |
children | f0ad094db832 |
comparison
equal
deleted
inserted
replaced
25112:3d14c1217117 | 25113:0ca8410ea345 |
---|---|
6 # Inspired by git bisect, extension skeleton taken from mq.py. | 6 # Inspired by git bisect, extension skeleton taken from mq.py. |
7 # | 7 # |
8 # This software may be used and distributed according to the terms of the | 8 # This software may be used and distributed according to the terms of the |
9 # GNU General Public License version 2 or any later version. | 9 # GNU General Public License version 2 or any later version. |
10 | 10 |
11 import collections | |
11 import os | 12 import os |
12 import error | 13 import error |
13 from i18n import _ | 14 from i18n import _ |
14 from node import short, hex | 15 from node import short, hex |
15 import util | 16 import util |
69 raise util.Abort(_("inconsistent state, %s:%s is good and bad") | 70 raise util.Abort(_("inconsistent state, %s:%s is good and bad") |
70 % (badrev, short(bad))) | 71 % (badrev, short(bad))) |
71 | 72 |
72 # build children dict | 73 # build children dict |
73 children = {} | 74 children = {} |
74 visit = util.deque([badrev]) | 75 visit = collections.deque([badrev]) |
75 candidates = [] | 76 candidates = [] |
76 while visit: | 77 while visit: |
77 rev = visit.popleft() | 78 rev = visit.popleft() |
78 if ancestors[rev] == []: | 79 if ancestors[rev] == []: |
79 candidates.append(rev) | 80 candidates.append(rev) |