--- a/hgext/obsolete.py Thu Sep 08 19:03:42 2011 +0200
+++ b/hgext/obsolete.py Thu Sep 08 19:07:00 2011 +0200
@@ -229,19 +229,20 @@
### pull // push support
def pull(self, remote, *args, **kwargs):
- obskey = remote.listkeys('obsolete')
- obsrels = obskey.get('relations', {})
result = opull(remote, *args, **kwargs)
- for sub, objs in obsrels.iteritems():
- for obj in objs:
- self.addobsolete(sub, obj)
+ if 'obsolete' in remote.listkeys('namespaces'):
+ tmp = StringIO()
+ tmp.write(remote.listkeys('obsolete')['relations'])
+ tmp.seek(0)
+ obsrels = repo._obsdeserialise(tmp)
+ for sub, objs in obsrels.iteritems():
+ for obj in objs:
+ self.addobsolete(sub, obj)
return result
def push(self, remote, *args, **opts):
- obskey = remote.listkeys('obsolete')
- obssupport = 'relations' in obskey
result = opush(remote, *args, **opts)
- if obssupport:
+ if 'obsolete' in remote.listkeys('namespaces'):
tmp = StringIO()
repo._obsserialise(tmp)
remote.pushkey('obsolete', 'relations', {}, tmp.getvalue())