D2369: narrowbundle2: replace map() with equivalent list comprehension
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Feb 21 17:42:13 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The result of this gets used as a list in core code, so the generator
returned by map() on Python 3 is a problem.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2369
AFFECTED FILES
hgext/narrow/narrowbundle2.py
CHANGE DETAILS
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -123,7 +123,7 @@
missing = list(cl.findmissingrevs(common=commonrevs, heads=headsrevs))
visit = reversed(missing)
relevant_nodes = set()
- visitnodes = map(cl.node, missing)
+ visitnodes = [cl.node(m) for m in missing]
required = set(headsrevs) | known
for rev in visit:
clrev = cl.changelogrevision(rev)
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list