changeset 50652:ebb292ffdf4d stable

delta-find: fix `parents` round detection We should compare integer with integer, instead of bytes (node).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jun 2023 02:42:28 +0200
parents d1dc4a03125e
children f930b1b1d671
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Thu Jun 08 02:35:03 2023 +0200
+++ b/mercurial/revlogutils/deltas.py	Thu Jun 08 02:42:28 2023 +0200
@@ -1328,7 +1328,7 @@
                     and cachedelta[0] in candidaterevs
                 ):
                     round_type = b"cached-delta"
-                elif p1 in candidaterevs or p2 in candidaterevs:
+                elif p1r in candidaterevs or p2r in candidaterevs:
                     round_type = b"parents"
                 elif prev is not None and all(c < prev for c in candidaterevs):
                     round_type = b"refine-down"
@@ -1356,9 +1356,9 @@
                     msg %= candidaterev
                     self._write_debug(msg)
                     candidate_type = None
-                    if candidaterev == p1:
+                    if candidaterev == p1r:
                         candidate_type = b"p1"
-                    elif candidaterev == p2:
+                    elif candidaterev == p2r:
                         candidate_type = b"p2"
                     elif self.revlog.issnapshot(candidaterev):
                         candidate_type = b"snapshot-%d"