Patchwork [2,of,7] py3: fix revnums in bookmark discovery to be consumable more than once

login
register
mail settings
Submitter Yuya Nishihara
Date July 9, 2018, 1:24 p.m.
Message ID <87079f4958b2a73c84d1.1531142672@mimosa>
Download mbox | patch
Permalink /patch/32700/
State Accepted
Headers show

Comments

Yuya Nishihara - July 9, 2018, 1:24 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1531043548 -32400
#      Sun Jul 08 18:52:28 2018 +0900
# Node ID 87079f4958b2a73c84d1a6339801854b5245ee0e
# Parent  505e0568b89501ef64d0522ba9b12afbd8642bca
py3: fix revnums in bookmark discovery to be consumable more than once

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -658,7 +658,7 @@  def _pushdiscoverybookmarks(pushop):
     ui.debug("checking for updated bookmarks\n")
     ancestors = ()
     if pushop.revs:
-        revnums = map(repo.changelog.rev, pushop.revs)
+        revnums = pycompat.maplist(repo.changelog.rev, pushop.revs)
         ancestors = repo.changelog.ancestors(revnums, inclusive=True)
 
     remotebookmark = listkeys(remote, 'bookmarks')