diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3973,12 +3973,13 @@ def pull(ui, repo, source="default", **o # not ending up with the name of the bookmark because of a race # condition on the server. (See issue 4689 for details) remotebookmarks = other.listkeys('bookmarks') + remotebookmarks = bookmarks.unhexlifybookmarks(remotebookmarks) pullopargs['remotebookmarks'] = remotebookmarks for b in opts['bookmark']: b = repo._bookmarks.expandname(b) if b not in remotebookmarks: raise error.Abort(_('remote bookmark %s not found!') % b) - revs.append(remotebookmarks[b]) + revs.append(hex(remotebookmarks[b])) if revs: try: diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1348,7 +1348,8 @@ def _pullbookmarkbundle1(pullop): # all known bundle2 servers now support listkeys, but lets be nice with # new implementation. return - pullop.remotebookmarks = pullop.remote.listkeys('bookmarks') + books = pullop.remote.listkeys('bookmarks') + pullop.remotebookmarks = bookmod.unhexlifybookmarks(books) @pulldiscovery('changegroup') @@ -1459,7 +1460,7 @@ def _pullbundle2(pullop): # processing bookmark update for namespace, value in op.records['listkeys']: if namespace == 'bookmarks': - pullop.remotebookmarks = value + pullop.remotebookmarks = bookmod.unhexlifybookmarks(value) # bookmark data were either already there or pulled in the bundle if pullop.remotebookmarks is not None: @@ -1552,7 +1553,6 @@ def _pullbookmarks(pullop): pullop.stepsdone.add('bookmarks') repo = pullop.repo remotebookmarks = pullop.remotebookmarks - remotebookmarks = bookmod.unhexlifybookmarks(remotebookmarks) bookmod.updatefromremote(repo.ui, repo, remotebookmarks, pullop.remote.url(), pullop.gettransaction,