deltafind: issue debug information when we fast-path rivial case too stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 08 Jun 2023 03:05:10 +0200
branchstable
changeset 50655 485c9410b75a
parent 50654 bfb6404089a5
child 50656 f2d78fb29f61
deltafind: issue debug information when we fast-path rivial case too More debug options never hurts.
mercurial/revlogutils/deltas.py
--- a/mercurial/revlogutils/deltas.py	Thu Jun 08 03:11:51 2023 +0200
+++ b/mercurial/revlogutils/deltas.py	Thu Jun 08 03:05:10 2023 +0200
@@ -1302,7 +1302,20 @@
         # not calling candelta since only one revision needs test, also to
         # avoid overhead fetching flags again.
         if not revinfo.textlen or revinfo.flags & REVIDX_RAWTEXT_CHANGING_FLAGS:
-            return self._fullsnapshotinfo(fh, revinfo, target_rev)
+            deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev)
+            if gather_debug:
+                end = util.timer()
+                dbg['duration'] = end - start
+                dbg[
+                    'delta-base'
+                ] = deltainfo.base  # pytype: disable=attribute-error
+                dbg['search_round_count'] = 0
+                dbg['using-cached-base'] = True
+                dbg['delta_try_count'] = 0
+                dbg['type'] = b"full"
+                dbg['snapshot-depth'] = 0
+                self._dbg_process_data(dbg)
+            return deltainfo
 
         if excluded_bases is None:
             excluded_bases = set()