Mercurial > hg-stable
comparison mercurial/treediscovery.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 | d2704c48f417 |
children | c6d049a5de43 |
comparison
equal
deleted
inserted
replaced
25112:3d14c1217117 | 25113:0ca8410ea345 |
---|---|
3 # Copyright 2010 Matt Mackall <mpm@selenic.com> | 3 # Copyright 2010 Matt Mackall <mpm@selenic.com> |
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 import collections | |
8 from node import nullid, short | 9 from node import nullid, short |
9 from i18n import _ | 10 from i18n import _ |
10 import util, error | 11 import util, error |
11 | 12 |
12 def findcommonincoming(repo, remote, heads=None, force=False): | 13 def findcommonincoming(repo, remote, heads=None, force=False): |
54 | 55 |
55 # search through remote branches | 56 # search through remote branches |
56 # a 'branch' here is a linear segment of history, with four parts: | 57 # a 'branch' here is a linear segment of history, with four parts: |
57 # head, root, first parent, second parent | 58 # head, root, first parent, second parent |
58 # (a branch always has two parents (or none) by definition) | 59 # (a branch always has two parents (or none) by definition) |
59 unknown = util.deque(remote.branches(unknown)) | 60 unknown = collections.deque(remote.branches(unknown)) |
60 while unknown: | 61 while unknown: |
61 r = [] | 62 r = [] |
62 while unknown: | 63 while unknown: |
63 n = unknown.popleft() | 64 n = unknown.popleft() |
64 if n[0] in seen: | 65 if n[0] in seen: |