diff -r 72e26319f3b8 -r 516b5a5edae3 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Apr 13 11:30:44 2018 -0700 +++ b/mercurial/debugcommands.py Fri Apr 13 11:45:38 2018 -0700 @@ -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: