convert: use `changelogrevision` to fetch changeset data instead of read
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 25 Sep 2023 12:32:42 +0200
changeset 51019 ed65e97db7bc
parent 51018 93a44c1ba0c6
child 51020 812cd3dfa4cb
convert: use `changelogrevision` to fetch changeset data instead of read This `changelogrevision` is a higher level function that will remain simple to use as we refactor the revlog.
hgext/convert/hg.py
--- a/hgext/convert/hg.py	Mon Sep 25 12:14:38 2023 +0200
+++ b/hgext/convert/hg.py	Mon Sep 25 12:32:42 2023 +0200
@@ -298,8 +298,9 @@
         parents = pl
         nparents = len(parents)
         if self.filemapmode and nparents == 1:
-            m1node = self.repo.changelog.read(bin(parents[0]))[0]
             parent = parents[0]
+            p1_node = bin(parent)
+            m1node = self.repo.changelog.changelogrevision(p1_node).manifest
 
         if len(parents) < 2:
             parents.append(self.repo.nullid)