mercurial/revlog.py
changeset 39886 debc4ee597e7
parent 39881 d63153611ed5
child 39908 d70e620ee8c9
--- a/mercurial/revlog.py	Wed Sep 26 18:30:19 2018 -0400
+++ b/mercurial/revlog.py	Wed Sep 19 21:02:47 2018 +0200
@@ -1745,6 +1745,10 @@
         tr.replace(self.indexfile, trindex * self._io.size)
         self._chunkclear()
 
+    def _nodeduplicatecallback(self, transaction, node):
+        """called when trying to add a node already stored.
+        """
+
     def addrevision(self, text, transaction, link, p1, p2, cachedelta=None,
                     node=None, flags=REVIDX_DEFAULT_FLAGS, deltacomputer=None):
         """add a revision to the log
@@ -2026,6 +2030,7 @@
                 nodes.append(node)
 
                 if node in self.nodemap:
+                    self._nodeduplicatecallback(transaction, node)
                     # this can happen if two branches make the same change
                     continue