Mercurial > public > mercurial-scm > hg
diff mercurial/revlogutils/deltas.py @ 49775:d57b966cdeb1
delta-find: properly report full snapshot used from cache as such
The number of tries and the delta base is reported differently so we missed
there detection initially.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 07 Dec 2022 20:05:19 +0100 |
parents | bcae90c53def |
children | acdb9a15137c |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Wed Dec 07 22:40:54 2022 +0100 +++ b/mercurial/revlogutils/deltas.py Wed Dec 07 20:05:19 2022 +0100 @@ -1392,12 +1392,20 @@ if gather_debug: end = util.timer() - used_cached = ( - cachedelta is not None - and dbg_try_rounds == 1 - and dbg_try_count == 1 - and deltainfo.base == cachedelta[0] - ) + if dbg_type == b'full': + used_cached = ( + cachedelta is not None + and dbg_try_rounds == 0 + and dbg_try_count == 0 + and cachedelta[0] == nullrev + ) + else: + used_cached = ( + cachedelta is not None + and dbg_try_rounds == 1 + and dbg_try_count == 1 + and deltainfo.base == cachedelta[0] + ) dbg = { 'duration': end - start, 'revision': target_rev,