Mercurial > hg
changeset 51333:0d92d62ecde0
delta-find: use "-1" as depth snapshot-dept for non snapshot in debug
This will help do distinct full snapshot (level 0) and normal delta (not a snapshot, no snapshot level)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 23 Nov 2023 21:13:14 +0100 |
parents | 2e169a222e63 |
children | d0d869fccd20 |
files | mercurial/revlogutils/deltas.py tests/test-bundle.t |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Thu Nov 23 21:45:45 2023 +0100 +++ b/mercurial/revlogutils/deltas.py Thu Nov 23 21:13:14 2023 +0100 @@ -1411,7 +1411,7 @@ dbg['delta_try_count'] = 0 dbg['type'] = b"full" if snapshotdepth is None: - dbg['snapshot-depth'] = 0 + dbg['snapshot-depth'] = -1 else: dbg['snapshot-depth'] = snapshotdepth self._dbg_process_data(dbg) @@ -1582,7 +1582,7 @@ 'snapshot-depth' ] = deltainfo.snapshotdepth # pytype: disable=attribute-error else: - dbg['snapshot-depth'] = 0 + dbg['snapshot-depth'] = -1 self._dbg_process_data(dbg) return deltainfo
--- a/tests/test-bundle.t Thu Nov 23 21:45:45 2023 +0100 +++ b/tests/test-bundle.t Thu Nov 23 21:13:14 2023 +0100 @@ -1062,8 +1062,8 @@ DBG-DELTAS: CHANGELOG: rev=2: delta-base=2 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) adding manifests DBG-DELTAS: MANIFESTLOG: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) - DBG-DELTAS: MANIFESTLOG: rev=1: delta-base=0 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) - DBG-DELTAS: MANIFESTLOG: rev=2: delta-base=1 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob) + DBG-DELTAS: MANIFESTLOG: rev=1: delta-base=0 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=-1 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) + DBG-DELTAS: MANIFESTLOG: rev=2: delta-base=1 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=-1 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob) adding file changes DBG-DELTAS: FILELOG:a: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) DBG-DELTAS: FILELOG:b: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)