# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2021-01-08 17:36:38 # Node ID 1fcab88ab85c5a807b1588b63346c3a3b7e5e26d # Parent 52abb1af2995e621e3965d91240fe2bc08e3400c downgrade: if a compression is removed, consider that too For compression format variant, the result of `fromrepo()` and `fromconfig()` is not a boolean and we have to actually equate those to find change. Differential Revision: https://phab.mercurial-scm.org/D9693 diff --git a/mercurial/upgrade_utils/actions.py b/mercurial/upgrade_utils/actions.py --- a/mercurial/upgrade_utils/actions.py +++ b/mercurial/upgrade_utils/actions.py @@ -467,6 +467,13 @@ def find_format_downgrades(repo): downgrades = [] for fv in allformatvariant: + if fv.name == b'compression': + # If there is a compression change between repository + # and config, destination repository compression will change + # and current compression will be removed. + if fv.fromrepo(repo) != fv.fromconfig(repo): + downgrades.append(fv) + continue # format variant exist in repo but does not exist in new repository # config if fv.fromrepo(repo) and not fv.fromconfig(repo):