[obsolete] Fix pushkey
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 09 Sep 2011 11:15:59 +0200
changeset 58 2ba7355f6e11
parent 57 62f2fe22bd42
child 59 02fba620d139
[obsolete] Fix pushkey
hgext/obsolete.py
--- a/hgext/obsolete.py	Fri Sep 09 11:15:44 2011 +0200
+++ b/hgext/obsolete.py	Fri Sep 09 11:15:59 2011 +0200
@@ -99,7 +99,11 @@
         relations = repo._obsdeserialise(tmp)
         for sub, objs in relations.iteritems():
             for obj in objs:
-                repo.addobsolete(sub, obj)
+                try:
+                    repo.addobsolete(sub, obj)
+                except error.RepoLookupError:
+                    pass
+        return 0
     finally:
         w.release()
 
@@ -245,7 +249,7 @@
             if 'obsolete' in remote.listkeys('namespaces'):
                 tmp = StringIO()
                 repo._obsserialise(tmp)
-                remote.pushkey('obsolete', 'relations', {}, tmp.getvalue())
+                remote.pushkey('obsolete', 'relations', '', tmp.getvalue())
 
             return result