# HG changeset patch # User Pierre-Yves David # Date 2022-05-18 14:55:14 # Node ID 5b1495c37b0cbc75a3f18f1d0a5f5b381eeb555d # Parent 13dfad0f9f7a253ff292b3f232ee426fb221a02e debugdeltachain: distinct between snapshot and "other" diffs Snapshot are expected to be healthy behavior, while "other" is a bit more suspicious. So we distinct between the two to make it easier to inspect repositories. diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -805,10 +805,12 @@ def debugdeltachain(ui, repo, file_=None deltatype = b'p1' elif e[3] == e[6]: deltatype = b'p2' + elif e[3] == rev: + deltatype = b'base' + elif r.issnapshot(rev): + deltatype = b'snap' elif e[3] == rev - 1: deltatype = b'prev' - elif e[3] == rev: - deltatype = b'base' else: deltatype = b'other' else: diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t --- a/tests/test-upgrade-repo.t +++ b/tests/test-upgrade-repo.t @@ -1456,7 +1456,7 @@ repository config is taken in account rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 - 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 + 2 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 $ hg debugupgraderepo --run --optimize 're-delta-all' upgrade will perform the following actions: