##// END OF EJS Templates
pushkey: add a ``decode`` function...
Pierre-Yves David -
r21659:a3198425 default
parent child Browse files
Show More
@@ -37,6 +37,8 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 decode = encoding.tolocal
41
40 def encodekeys(keys):
42 def encodekeys(keys):
41 """encode the content of a pushkey namespace for exchange over the wire"""
43 """encode the content of a pushkey namespace for exchange over the wire"""
42 enc = encoding.fromlocal
44 enc = encoding.fromlocal
@@ -47,5 +49,5 b' def decodekeys(data):'
47 result = {}
49 result = {}
48 for l in data.splitlines():
50 for l in data.splitlines():
49 k, v = l.split('\t')
51 k, v = l.split('\t')
50 result[encoding.tolocal(k)] = encoding.tolocal(v)
52 result[decode(k)] = decode(v)
51 return result
53 return result
General Comments 0
You need to be logged in to leave comments. Login now