diff mercurial/exchangev2.py @ 46509:7a93b7b3dc2d

revlog: change addgroup callbacks to take revision numbers Differential Revision: https://phab.mercurial-scm.org/D9883
author Joerg Sonnenberger <joerg@bec.de>
date Wed, 27 Jan 2021 02:34:51 +0100
parents 711ba0f1057e
children ee91966aec0f
line wrap: on
line diff
--- a/mercurial/exchangev2.py	Wed Jan 27 01:43:17 2021 +0100
+++ b/mercurial/exchangev2.py	Wed Jan 27 02:34:51 2021 +0100
@@ -358,15 +358,14 @@
         # Linkrev for changelog is always self.
         return len(cl)
 
-    def ondupchangeset(cl, node):
-        added.append(node)
+    def ondupchangeset(cl, rev):
+        added.append(cl.node(rev))
 
-    def onchangeset(cl, node):
+    def onchangeset(cl, rev):
         progress.increment()
 
-        rev = cl.rev(node)
         revision = cl.changelogrevision(rev)
-        added.append(node)
+        added.append(cl.node(rev))
 
         # We need to preserve the mapping of changelog revision to node
         # so we can set the linkrev accordingly when manifests are added.
@@ -537,8 +536,8 @@
             # Chomp off header object.
             next(objs)
 
-            def onchangeset(cl, node):
-                added.append(node)
+            def onchangeset(cl, rev):
+                added.append(cl.node(rev))
 
             rootmanifest.addgroup(
                 iterrevisions(objs, progress),