Show More
@@ -97,9 +97,9 b' def upgraderepo(' | |||||
97 | hint=_(b'run without arguments to see valid optimizations'), |
|
97 | hint=_(b'run without arguments to see valid optimizations'), | |
98 | ) |
|
98 | ) | |
99 |
|
99 | |||
100 |
d |
|
100 | format_upgrades = upgrade_actions.find_format_upgrades(repo) | |
101 | actions = upgrade_actions.determineactions( |
|
101 | actions = upgrade_actions.determineactions( | |
102 |
repo, d |
|
102 | repo, format_upgrades, repo.requirements, newreqs | |
103 | ) |
|
103 | ) | |
104 | actions.extend( |
|
104 | actions.extend( | |
105 | o |
|
105 | o | |
@@ -135,7 +135,7 b' def upgraderepo(' | |||||
135 | fromconfig = [] |
|
135 | fromconfig = [] | |
136 | onlydefault = [] |
|
136 | onlydefault = [] | |
137 |
|
137 | |||
138 |
for d in d |
|
138 | for d in format_upgrades: | |
139 | if d.fromconfig(repo): |
|
139 | if d.fromconfig(repo): | |
140 | fromconfig.append(d) |
|
140 | fromconfig.append(d) | |
141 | elif d.default: |
|
141 | elif d.default: | |
@@ -165,12 +165,7 b' def upgraderepo(' | |||||
165 |
|
165 | |||
166 | ui.status(b'\n') |
|
166 | ui.status(b'\n') | |
167 | else: |
|
167 | else: | |
168 | ui.status( |
|
168 | ui.status(_(b'(no format upgrades found in existing repository)\n')) | |
169 | _( |
|
|||
170 | b'(no feature deficiencies found in existing ' |
|
|||
171 | b'repository)\n' |
|
|||
172 | ) |
|
|||
173 | ) |
|
|||
174 |
|
169 | |||
175 | ui.status( |
|
170 | ui.status( | |
176 | _( |
|
171 | _( |
@@ -410,9 +410,9 b' class compressionlevel(formatvariant):' | |||||
410 | return bytes(level) |
|
410 | return bytes(level) | |
411 |
|
411 | |||
412 |
|
412 | |||
413 |
def find |
|
413 | def find_format_upgrades(repo): | |
414 |
"""returns a list of |
|
414 | """returns a list of format upgrades which can be perform on the repo""" | |
415 |
d |
|
415 | upgrades = [] | |
416 |
|
416 | |||
417 | # We could detect lack of revlogv1 and store here, but they were added |
|
417 | # We could detect lack of revlogv1 and store here, but they were added | |
418 | # in 0.9.2 and we don't support upgrading repos without these |
|
418 | # in 0.9.2 and we don't support upgrading repos without these | |
@@ -420,9 +420,9 b' def finddeficiencies(repo):' | |||||
420 |
|
420 | |||
421 | for fv in allformatvariant: |
|
421 | for fv in allformatvariant: | |
422 | if not fv.fromrepo(repo): |
|
422 | if not fv.fromrepo(repo): | |
423 |
d |
|
423 | upgrades.append(fv) | |
424 |
|
424 | |||
425 |
return d |
|
425 | return upgrades | |
426 |
|
426 | |||
427 |
|
427 | |||
428 | ALL_OPTIMISATIONS = [] |
|
428 | ALL_OPTIMISATIONS = [] | |
@@ -523,10 +523,10 b' def findoptimizations(repo):' | |||||
523 | return list(ALL_OPTIMISATIONS) |
|
523 | return list(ALL_OPTIMISATIONS) | |
524 |
|
524 | |||
525 |
|
525 | |||
526 |
def determineactions(repo, d |
|
526 | def determineactions(repo, format_upgrades, sourcereqs, destreqs): | |
527 | """Determine upgrade actions that will be performed. |
|
527 | """Determine upgrade actions that will be performed. | |
528 |
|
528 | |||
529 |
Given a list of improvements as returned by ``find |
|
529 | Given a list of improvements as returned by ``find_format_upgrades`` and | |
530 | ``findoptimizations``, determine the list of upgrade actions that |
|
530 | ``findoptimizations``, determine the list of upgrade actions that | |
531 | will be performed. |
|
531 | will be performed. | |
532 |
|
532 | |||
@@ -538,7 +538,7 b' def determineactions(repo, deficiencies,' | |||||
538 | """ |
|
538 | """ | |
539 | newactions = [] |
|
539 | newactions = [] | |
540 |
|
540 | |||
541 |
for d in d |
|
541 | for d in format_upgrades: | |
542 | name = d._requirement |
|
542 | name = d._requirement | |
543 |
|
543 | |||
544 | # If the action is a requirement that doesn't show up in the |
|
544 | # If the action is a requirement that doesn't show up in the |
@@ -173,7 +173,7 b' An upgrade of a repository created with ' | |||||
173 | } |
|
173 | } | |
174 | ] |
|
174 | ] | |
175 | $ hg debugupgraderepo |
|
175 | $ hg debugupgraderepo | |
176 |
(no f |
|
176 | (no format upgrades found in existing repository) | |
177 | performing an upgrade with "--run" will make the following changes: |
|
177 | performing an upgrade with "--run" will make the following changes: | |
178 |
|
178 | |||
179 | requirements |
|
179 | requirements | |
@@ -212,7 +212,7 b' An upgrade of a repository created with ' | |||||
212 | --optimize can be used to add optimizations |
|
212 | --optimize can be used to add optimizations | |
213 |
|
213 | |||
214 | $ hg debugupgrade --optimize redeltaparent |
|
214 | $ hg debugupgrade --optimize redeltaparent | |
215 |
(no f |
|
215 | (no format upgrades found in existing repository) | |
216 | performing an upgrade with "--run" will make the following changes: |
|
216 | performing an upgrade with "--run" will make the following changes: | |
217 |
|
217 | |||
218 | requirements |
|
218 | requirements | |
@@ -243,7 +243,7 b' An upgrade of a repository created with ' | |||||
243 | modern form of the option |
|
243 | modern form of the option | |
244 |
|
244 | |||
245 | $ hg debugupgrade --optimize re-delta-parent |
|
245 | $ hg debugupgrade --optimize re-delta-parent | |
246 |
(no f |
|
246 | (no format upgrades found in existing repository) | |
247 | performing an upgrade with "--run" will make the following changes: |
|
247 | performing an upgrade with "--run" will make the following changes: | |
248 |
|
248 | |||
249 | requirements |
|
249 | requirements |
General Comments 0
You need to be logged in to leave comments.
Login now