##// END OF EJS Templates
pushkey: add an ``encode`` function...
Pierre-Yves David -
r21661:2f52a16f default
parent child Browse files
Show More
@@ -37,12 +37,13 b' def list(repo, namespace):'
37 lk = _get(namespace)[1]
37 lk = _get(namespace)[1]
38 return lk(repo)
38 return lk(repo)
39
39
40 encode = encoding.fromlocal
41
40 decode = encoding.tolocal
42 decode = encoding.tolocal
41
43
42 def encodekeys(keys):
44 def encodekeys(keys):
43 """encode the content of a pushkey namespace for exchange over the wire"""
45 """encode the content of a pushkey namespace for exchange over the wire"""
44 enc = encoding.fromlocal
46 return '\n'.join(['%s\t%s' % (encode(k), encode(v)) for k, v in keys])
45 return '\n'.join(['%s\t%s' % (enc(k), enc(v)) for k, v in keys])
46
47
47 def decodekeys(data):
48 def decodekeys(data):
48 """decode the content of a pushkey namespace from exchange over the wire"""
49 """decode the content of a pushkey namespace from exchange over the wire"""
General Comments 0
You need to be logged in to leave comments. Login now