Pierre-Yves David committed 3ad2587

obsolete: lazy relation adding

  • Participants
  • Parent commits 6bcbf7f
  • Branches default

Comments (0)

Files changed (1)

File hgext/

             """Add a relation marking that node <sub> is a new version of <obj>"""
             if sub == nullid:
                 sub = None
+            if obj in self._obssubrels.get(sub, set()):
+                return 0
             self._obssubrels.setdefault(sub, set()).add(obj)
             self._obsobjrels.setdefault(obj, set()).add(sub)
                 del self._obssubrels
             if '_obsoleteset' in vars(self):
                 del self._obsoleteset
+            return 1
         ### obsolete storage