diff -r d67bcfc0041f -r ad2b35ebf670 mercurial/upgrade.py --- a/mercurial/upgrade.py Thu Sep 22 19:41:42 2016 +0900 +++ b/mercurial/upgrade.py Thu Dec 07 01:51:54 2017 +0100 @@ -94,6 +94,9 @@ 'generaldelta', } +def preservedrequirements(repo): + return set() + deficiency = 'deficiency' optimisation = 'optimization' @@ -679,6 +682,7 @@ # FUTURE there is potentially a need to control the wanted requirements via # command arguments or via an extension hook point. newreqs = localrepo.newreporequirements(repo) + newreqs.update(preservedrequirements(repo)) noremovereqs = (repo.requirements - newreqs - supportremovedrequirements(repo))