##// END OF EJS Templates
pushkey: introduce an ``encodekeys`` function...
Pierre-Yves David -
r21650:a2c7ae21 default
parent child Browse files
Show More
@@ -5,7 +5,7 b''
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 import bookmarks, phases, obsolete
8 import bookmarks, phases, obsolete, encoding
9
9
10 def _nslist(repo):
10 def _nslist(repo):
11 n = {}
11 n = {}
@@ -37,3 +37,7 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 def encodekeys(keys):
41 """encode the content of a pushkey namespace for exchange over the wire"""
42 enc = encoding.fromlocal
43 return '\n'.join(['%s\t%s' % (enc(k), enc(v)) for k, v in keys])
General Comments 0
You need to be logged in to leave comments. Login now