Commits

Pierre-Yves David committed 7571534

[obsolet] base64 encore obsolete rel for pushkey

Yop this is ugly

Comments (0)

Files changed (1)

hgext/obsolete.py

 
 from mercurial.i18n import _
 
+import base64
+
 from mercurial import util
 from mercurial import context
 from mercurial import revset
     XXX this have be improved"""
     tmp = StringIO()
     _obsserialise(repo._obssubrels, tmp)
-    return {'relations': tmp.getvalue()}
+    return {'relations': base64.b64encode(tmp.getvalue())}
 
 pushkey.register('obsolete', pushobsolete, listobsolete)
 
             result = opull(remote, *args, **kwargs)
             if 'obsolete' in remote.listkeys('namespaces'):
                 tmp = StringIO()
-                tmp.write(remote.listkeys('obsolete')['relations'])
+                rels = remote.listkeys('obsolete')['relations']
+                tmp.write(base64.b64decode(rels))
                 tmp.seek(0)
                 obsrels = _obsdeserialise(tmp)
                 for sub, objs in obsrels.iteritems():