diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -1832,7 +1832,14 @@ target = hg.peer(ui, {}, repopath) if keyinfo: key, old, new = keyinfo - r = target.pushkey(namespace, key, old, new) + with target.commandexecutor() as e: + r = e.callcommand('pushkey', { + 'namespace': namespace, + 'key': key, + 'old': old, + 'new': new, + }).result() + ui.status(pycompat.bytestr(r) + '\n') return not r else: diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1212,10 +1212,14 @@ outdated = [c for c in outdated if c.node() not in pheads] # fallback to independent pushkey command for newremotehead in outdated: - r = pushop.remote.pushkey('phases', - newremotehead.hex(), - ('%d' % phases.draft), - ('%d' % phases.public)) + with pushop.remote.commandexecutor() as e: + r = e.callcommand('pushkey', { + 'namespace': 'phases', + 'key': newremotehead.hex(), + 'old': '%d' % phases.draft, + 'new': '%d' % phases.public + }).result() + if not r: pushop.ui.warn(_('updating %s to public failed!\n') % newremotehead) @@ -1270,7 +1274,16 @@ action = 'export' elif not new: action = 'delete' - if remote.pushkey('bookmarks', b, old, new): + + with remote.commandexecutor() as e: + r = e.callcommand('pushkey', { + 'namespace': 'bookmarks', + 'key': b, + 'old': old, + 'new': new, + }).result() + + if r: ui.status(bookmsgmap[action][0] % b) else: ui.warn(bookmsgmap[action][1] % b)