An ugrade operation can also downgrade/remove some format variants. Before this
patch there was no clean way to find out all such variants which will be
removed. This patch adds a function for that.
It will be used in next patch.
marmoute | |
mharbison72 |
hg-reviewers |
An ugrade operation can also downgrade/remove some format variants. Before this
patch there was no clean way to find out all such variants which will be
removed. This patch adds a function for that.
It will be used in next patch.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/upgrade_utils/actions.py (15 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
52cf924e702c | cf255021149c | Pulkit Goyal | Dec 16 2020, 4:34 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Changes Planned | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit |
for fv in allformatvariant: | for fv in allformatvariant: | ||||
if not fv.fromrepo(repo): | if not fv.fromrepo(repo): | ||||
upgrades.append(fv) | upgrades.append(fv) | ||||
return upgrades | return upgrades | ||||
def find_format_downgrades(repo): | |||||
"""returns a list of format downgrades which will be performed on the repo | |||||
because of disabled config option for them""" | |||||
downgrades = [] | |||||
for fv in allformatvariant: | |||||
# format variant exist in repo but does not exist in new repository | |||||
# config | |||||
if fv.fromrepo(repo) and not fv.fromconfig(repo): | |||||
downgrades.append(fv) | |||||
return downgrades | |||||
ALL_OPTIMISATIONS = [] | ALL_OPTIMISATIONS = [] | ||||
def register_optimization(obj): | def register_optimization(obj): | ||||
ALL_OPTIMISATIONS.append(obj) | ALL_OPTIMISATIONS.append(obj) | ||||
return obj | return obj | ||||