revlog: remove legacy usage of `canonical_parent_order`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 10 Oct 2023 11:36:34 +0200
changeset 51065 14574a41a7a7
parent 51064 81f3877372c3
child 51066 b79c73a7afce
revlog: remove legacy usage of `canonical_parent_order` All core code is now getting the setting from the FeatureConfig object.
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue Oct 10 11:36:23 2023 +0200
+++ b/mercurial/revlog.py	Tue Oct 10 11:36:34 2023 +0200
@@ -1223,7 +1223,7 @@
                 raise error.WdirUnsupported
             raise
 
-        if self.canonical_parent_order and entry[5] == nullrev:
+        if self.feature_config.canonical_parent_order and entry[5] == nullrev:
             return entry[6], entry[5]
         else:
             return entry[5], entry[6]
@@ -1248,7 +1248,7 @@
         i = self.index
         d = i[self.rev(node)]
         # inline node() to avoid function call overhead
-        if self.canonical_parent_order and d[5] == self.nullid:
+        if self.feature_config.canonical_parent_order and d[5] == self.nullid:
             return i[d[6]][7], i[d[5]][7]
         else:
             return i[d[5]][7], i[d[6]][7]