Mercurial > hg-stable
changeset 21651:3aae044408aa
wireproto: use pushkey.encodekey
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 27 May 2014 15:00:08 -0700 |
parents | a2c7ae21e8f4 |
children | ed6e61eaebc0 |
files | mercurial/wireproto.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireproto.py Tue May 27 14:57:28 2014 -0700 +++ b/mercurial/wireproto.py Tue May 27 15:00:08 2014 -0700 @@ -8,7 +8,7 @@ import urllib, tempfile, os, sys from i18n import _ from node import bin, hex -import changegroup as changegroupmod, bundle2 +import changegroup as changegroupmod, bundle2, pushkey as pushkeymod import peer, error, encoding, util, store, exchange @@ -680,9 +680,7 @@ @wireprotocommand('listkeys', 'namespace') def listkeys(repo, proto, namespace): d = repo.listkeys(encoding.tolocal(namespace)).items() - t = '\n'.join(['%s\t%s' % (encoding.fromlocal(k), encoding.fromlocal(v)) - for k, v in d]) - return t + return pushkeymod.encodekeys(d) @wireprotocommand('lookup', 'key') def lookup(repo, proto, key):