--- a/mercurial/treediscovery.py Tue May 15 10:44:17 2012 -0700
+++ b/mercurial/treediscovery.py Tue May 15 10:46:23 2012 -0700
@@ -7,7 +7,7 @@
from node import nullid, short
from i18n import _
-import util, error
+import util, error, collections
def findcommonincoming(repo, remote, heads=None, force=False):
"""Return a tuple (common, fetch, heads) used to identify the common
@@ -56,11 +56,11 @@
# 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 = remote.branches(unknown)
+ unknown = collections.deque(remote.branches(unknown))
while unknown:
r = []
while unknown:
- n = unknown.pop(0)
+ n = unknown.popleft()
if n[0] in seen:
continue