172
172
# - we can fill out existence flags at this point
173
173
# - we can read the revision inventory sha at this point
174
174
# - we can check properties and serialisers etc.
175
if not self.repository._format.revision_graph_can_have_wrong_parents:
175
if not self.repository.revision_graph_can_have_wrong_parents():
176
176
# The check against the index isn't needed.
177
177
self.revs_with_bad_parents_in_index = None
178
178
for thing in revision_iterator:
330
330
self.text_key_references[key] = True
333
@deprecated_function(deprecated_in((1,6,0)))
334
def check(branch, verbose):
335
"""Run consistency checks on a branch.
337
Results are reported through logging.
339
Deprecated in 1.6. Please use check_dwim instead.
341
:raise BzrCheckError: if there's a consistency error.
343
check_branch(branch, verbose)
346
@deprecated_function(deprecated_in((1,16,0)))
347
def check_branch(branch, verbose):
348
"""Run consistency checks on a branch.
350
Results are reported through logging.
352
:raise BzrCheckError: if there's a consistency error.
357
for ref in branch._get_check_refs():
358
needed_refs.setdefault(ref, []).append(branch)
359
result = branch.repository.check([branch.last_revision()], needed_refs)
360
branch_result = result.other_results[0]
363
branch_result.report_results(verbose)
333
366
def scan_branch(branch, needed_refs, to_unlock):
334
367
"""Scan a branch for refs.