hgext/convert/convcmd.py
changeset 35779 eefabd9ed3e1
parent 35197 bfd072c52e03
child 36132 42a393ea56d2
--- a/hgext/convert/convcmd.py	Sat Jan 20 23:21:59 2018 -0800
+++ b/hgext/convert/convcmd.py	Sun Jan 21 17:11:31 2018 -0800
@@ -6,6 +6,7 @@
 # GNU General Public License version 2 or any later version.
 from __future__ import absolute_import
 
+import collections
 import os
 import shlex
 import shutil
@@ -290,13 +291,13 @@
             revisions without parents. 'parents' must be a mapping of revision
             identifier to its parents ones.
             """
-            visit = sorted(parents)
+            visit = collections.deque(sorted(parents))
             seen = set()
             children = {}
             roots = []
 
             while visit:
-                n = visit.pop(0)
+                n = visit.popleft()
                 if n in seen:
                     continue
                 seen.add(n)