Patchwork [6,of,6] py3: fix bundle heads to be consumable more than once

login
register
mail settings
Submitter Yuya Nishihara
Date July 8, 2018, 12:30 p.m.
Message ID <6905e97bbeecb2c7fce4.1531053047@mimosa>
Download mbox | patch
Permalink /patch/32692/
State Accepted
Headers show

Comments

Yuya Nishihara - July 8, 2018, 12:30 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1531039542 -32400
#      Sun Jul 08 17:45:42 2018 +0900
# Node ID 6905e97bbeecb2c7fce448facb457c4ba294cbc9
# Parent  b7a4422cf4bb5b39b8205756d2cba7ca9bd0e9f2
py3: fix bundle heads to be consumable more than once

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -32,8 +32,10 @@  test-branch-option.t
 test-branch-tag-confict.t
 test-branches.t
 test-bundle-phases.t
+test-bundle-r.t
 test-bundle-type.t
 test-bundle-vs-outgoing.t
+test-bundle.t
 test-bundle2-multiple-changegroups.t
 test-bundle2-pushback.t
 test-cappedreader.py
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1220,7 +1220,7 @@  def bundle(ui, repo, fname, dest=None, *
         other = hg.peer(repo, opts, dest)
         revs = [repo[r].hex() for r in revs]
         revs, checkout = hg.addbranchrevs(repo, repo, branches, revs)
-        heads = revs and map(repo.lookup, revs) or revs
+        heads = revs and pycompat.maplist(repo.lookup, revs) or revs
         outgoing = discovery.findcommonoutgoing(repo, other,
                                                 onlyheads=heads,
                                                 force=opts.get('force'),