diff -r 72e487851a53 -r 33c6f8f0388d mercurial/wireproto.py --- a/mercurial/wireproto.py Thu Mar 01 08:24:54 2018 -0800 +++ b/mercurial/wireproto.py Fri Feb 23 09:40:12 2018 -0800 @@ -916,7 +916,7 @@ @wireprotocommand('listkeys', 'namespace') def listkeys(repo, proto, namespace): - d = repo.listkeys(encoding.tolocal(namespace)).items() + d = sorted(repo.listkeys(encoding.tolocal(namespace)).items()) return bytesresponse(pushkeymod.encodekeys(d)) @wireprotocommand('lookup', 'key')