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