1
from bzrlib.util import bencode
5
new_name = dict((k, v.encode('utf-8')) for k, v in tt._new_name.items())
7
'_id_number': tt._id_number,
11
return bencode.bencode(attribs)
13
def deserialize(tt, input):
14
attribs = bencode.bdecode(input)
15
tt._id_number = attribs['_id_number']
16
tt._new_name = dict((k, v.decode('utf-8'))
17
for k, v in attribs['_new_name'].items())
18
tt._new_id = attribs['_new_id']
19
tt._r_new_id = dict((v, k) for k, v in tt._new_id.items())