mercurial/revlog.py
changeset 34147 b96cfc309ac5
parent 34028 bfb38c5cebf4
child 34148 c8b6ed51386b
--- a/mercurial/revlog.py	Mon Sep 11 17:49:49 2017 +0000
+++ b/mercurial/revlog.py	Wed Sep 13 10:43:16 2017 -0700
@@ -1916,11 +1916,11 @@
                 flags = chunkdata['flags'] or REVIDX_DEFAULT_FLAGS
 
                 nodes.append(node)
+                chain = node
 
                 link = linkmapper(cs)
                 if node in self.nodemap:
                     # this can happen if two branches make the same change
-                    chain = node
                     continue
 
                 for p in (p1, p2):
@@ -1954,13 +1954,13 @@
                 # We're only using addgroup() in the context of changegroup
                 # generation so the revision data can always be handled as raw
                 # by the flagprocessor.
-                chain = self._addrevision(node, None, transaction, link,
-                                          p1, p2, flags, (baserev, delta),
-                                          ifh, dfh,
-                                          alwayscache=bool(addrevisioncb))
+                self._addrevision(node, None, transaction, link,
+                                  p1, p2, flags, (baserev, delta),
+                                  ifh, dfh,
+                                  alwayscache=bool(addrevisioncb))
 
                 if addrevisioncb:
-                    addrevisioncb(self, chain)
+                    addrevisioncb(self, node)
 
                 if not dfh and not self._inline:
                     # addrevision switched from inline to conventional