D1934: convert: use a collections.deque
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Jan 22 13:00:28 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGeefabd9ed3e1: convert: use a collections.deque (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1934?vs=4975&id=4976
REVISION DETAIL
https://phab.mercurial-scm.org/D1934
AFFECTED FILES
hgext/convert/convcmd.py
CHANGE DETAILS
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -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)
To: indygreg, #hg-reviewers, phillco, yuja
Cc: yuja, phillco, mercurial-devel
More information about the Mercurial-devel
mailing list