Show More
@@ -167,16 +167,8 b' def upgraderepo(' | |||||
167 | for a in actions: |
|
167 | for a in actions: | |
168 | ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) |
|
168 | ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) | |
169 |
|
169 | |||
170 | def print_affected_revlogs(): |
|
|||
171 | if not revlogs: |
|
|||
172 | ui.write((b'no revlogs to process\n')) |
|
|||
173 | else: |
|
|||
174 | ui.write((b'processed revlogs:\n')) |
|
|||
175 | for r in sorted(revlogs): |
|
|||
176 | ui.write((b' - %s\n' % r)) |
|
|||
177 | ui.write((b'\n')) |
|
|||
178 |
|
||||
179 | upgrade_op = upgrade_actions.UpgradeOperation( |
|
170 | upgrade_op = upgrade_actions.UpgradeOperation( | |
|
171 | ui, | |||
180 | newreqs, |
|
172 | newreqs, | |
181 | [a.name for a in actions], |
|
173 | [a.name for a in actions], | |
182 | revlogs, |
|
174 | revlogs, | |
@@ -233,7 +225,7 b' def upgraderepo(' | |||||
233 | printrequirements() |
|
225 | printrequirements() | |
234 | printoptimisations() |
|
226 | printoptimisations() | |
235 | printupgradeactions() |
|
227 | printupgradeactions() | |
236 | print_affected_revlogs() |
|
228 | upgrade_op.print_affected_revlogs() | |
237 |
|
229 | |||
238 | unusedoptimize = [i for i in alloptimizations if i not in actions] |
|
230 | unusedoptimize = [i for i in alloptimizations if i not in actions] | |
239 |
|
231 | |||
@@ -253,7 +245,7 b' def upgraderepo(' | |||||
253 | printrequirements() |
|
245 | printrequirements() | |
254 | printoptimisations() |
|
246 | printoptimisations() | |
255 | printupgradeactions() |
|
247 | printupgradeactions() | |
256 | print_affected_revlogs() |
|
248 | upgrade_op.print_affected_revlogs() | |
257 |
|
249 | |||
258 | ui.status(_(b'beginning upgrade...\n')) |
|
250 | ui.status(_(b'beginning upgrade...\n')) | |
259 | with repo.wlock(), repo.lock(): |
|
251 | with repo.wlock(), repo.lock(): |
@@ -557,11 +557,21 b' def determineactions(repo, deficiencies,' | |||||
557 | class UpgradeOperation(object): |
|
557 | class UpgradeOperation(object): | |
558 | """represent the work to be done during an upgrade""" |
|
558 | """represent the work to be done during an upgrade""" | |
559 |
|
559 | |||
560 | def __init__(self, requirements, actions, revlogs_to_process): |
|
560 | def __init__(self, ui, requirements, actions, revlogs_to_process): | |
|
561 | self.ui = ui | |||
561 | self.requirements = requirements |
|
562 | self.requirements = requirements | |
562 | self.actions = actions |
|
563 | self.actions = actions | |
563 | self.revlogs_to_process = revlogs_to_process |
|
564 | self.revlogs_to_process = revlogs_to_process | |
564 |
|
565 | |||
|
566 | def print_affected_revlogs(self): | |||
|
567 | if not self.revlogs_to_process: | |||
|
568 | self.ui.write((b'no revlogs to process\n')) | |||
|
569 | else: | |||
|
570 | self.ui.write((b'processed revlogs:\n')) | |||
|
571 | for r in sorted(self.revlogs_to_process): | |||
|
572 | self.ui.write((b' - %s\n' % r)) | |||
|
573 | self.ui.write((b'\n')) | |||
|
574 | ||||
565 |
|
575 | |||
566 | ### Code checking if a repository can got through the upgrade process at all. # |
|
576 | ### Code checking if a repository can got through the upgrade process at all. # | |
567 |
|
577 |
General Comments 0
You need to be logged in to leave comments.
Login now