200
200
result.report_results(verbose)
202
202
def _report_repo_results(self, verbose):
203
note('checked repository %s format %s',
203
note(gettext('checked repository {0} format {1}').format(
204
204
self.repository.user_url,
205
self.repository._format)
206
note('%6d revisions', self.checked_rev_cnt)
207
note('%6d file-ids', len(self.checked_weaves))
205
self.repository._format))
206
note(gettext('%6d revisions'), self.checked_rev_cnt)
207
note(gettext('%6d file-ids'), len(self.checked_weaves))
209
note('%6d unreferenced text versions',
209
note(gettext('%6d unreferenced text versions'),
210
210
len(self.unreferenced_versions))
211
211
if verbose and len(self.unreferenced_versions):
212
212
for file_id, revision_id in self.unreferenced_versions:
213
note('unreferenced version: {%s} in %s', revision_id,
213
note(gettext('unreferenced version: {{{0}}} in {1}').format(revision_id,
215
215
if self.missing_inventory_sha_cnt:
216
note('%6d revisions are missing inventory_sha1',
216
note(gettext('%6d revisions are missing inventory_sha1'),
217
217
self.missing_inventory_sha_cnt)
218
218
if self.missing_revision_cnt:
219
note('%6d revisions are mentioned but not present',
219
note(gettext('%6d revisions are mentioned but not present'),
220
220
self.missing_revision_cnt)
221
221
if len(self.ghosts):
222
note('%6d ghost revisions', len(self.ghosts))
222
note(gettext('%6d ghost revisions'), len(self.ghosts))
224
224
for ghost in self.ghosts:
225
225
note(' %s', ghost)
226
226
if len(self.missing_parent_links):
227
note('%6d revisions missing parents in ancestry',
227
note(gettext('%6d revisions missing parents in ancestry'),
228
228
len(self.missing_parent_links))
230
230
for link, linkers in self.missing_parent_links.items():
231
note(' %s should be in the ancestry for:', link)
231
note(gettext(' %s should be in the ancestry for:'), link)
232
232
for linker in linkers:
233
233
note(' * %s', linker)
234
234
if len(self.inconsistent_parents):
235
note('%6d inconsistent parents', len(self.inconsistent_parents))
235
note(gettext('%6d inconsistent parents'), len(self.inconsistent_parents))
237
237
for info in self.inconsistent_parents:
238
238
revision_id, file_id, found_parents, correct_parents = info
239
note(' * %s version %s has parents %r '
241
% (file_id, revision_id, found_parents,
239
note(gettext(' * {0} version {1} has parents {2!r} '
240
'but should have {3!r}').format(
241
file_id, revision_id, found_parents,
242
242
correct_parents))
243
243
if self.revs_with_bad_parents_in_index:
244
note('%6d revisions have incorrect parents in the revision index',
245
'%6d revisions have incorrect parents in the revision index'),
245
246
len(self.revs_with_bad_parents_in_index))
247
248
for item in self.revs_with_bad_parents_in_index:
248
249
revision_id, index_parents, actual_parents = item
250
' %s has wrong parents in index: '
252
revision_id, index_parents, actual_parents)
251
' {0} has wrong parents in index: '
252
'{1!r} should be {2!r}').format(
253
revision_id, index_parents, actual_parents))
253
254
for item in self._report_items:
422
423
scan_branch(branch, needed_refs, to_unlock)
423
424
if do_branch and not branches:
424
note("No branch found at specified location.")
425
note(gettext("No branch found at specified location."))
425
426
if do_tree and base_tree is None and not saw_tree:
426
note("No working tree found at specified location.")
427
note(gettext("No working tree found at specified location."))
427
428
if do_repo or do_branch or do_tree:
429
note("Checking repository at '%s'."
430
note(gettext("Checking repository at '%s'.")
430
431
% (repo.user_url,))
431
432
result = repo.check(None, callback_refs=needed_refs,
432
433
check_repo=do_repo)
433
434
result.report_results(verbose)
436
note("No working tree found at specified location.")
437
note(gettext("No working tree found at specified location."))
438
note("No branch found at specified location.")
439
note(gettext("No branch found at specified location."))
440
note("No repository found at specified location.")
441
note(gettext("No repository found at specified location."))
442
443
for thing in to_unlock: