Commits

Pierre-Yves David committed 2ba7355

[obsolete] Fix pushkey

Comments (0)

Files changed (1)

hgext/obsolete.py

         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()
 
             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