b.check : module documentation

Part of bzrlib

Checking of bzr objects.

check_refs is a concept used for optimising check. Objects that depend on other objects (e.g. tree on repository) can list the objects they would be requesting so that when the dependent object is checked, matches can be pulled out and evaluated in-line rather than re-reading the same data many times. check_refs are tuples (kind, value). Currently defined kinds are:

Class Check Check a repository
Class VersionedFileCheck Check a versioned file repository
Function scan_branch Scan a branch for refs.
Function scan_tree Scan a tree for refs.
Function check_dwim Check multiple objects.
def scan_branch(branch, needed_refs, to_unlock):
Scan a branch for refs.
ParametersbranchThe branch to schedule for checking.
needed_refsRefs we are accumulating.
to_unlockThe unlock list accumulating.
def scan_tree(base_tree, tree, needed_refs, to_unlock):
Scan a tree for refs.
Parametersbase_treeThe original tree check opened, used to detect duplicate tree checks.
treeThe tree to schedule for checking.
needed_refsRefs we are accumulating.
to_unlockThe unlock list accumulating.
def check_dwim(path, verbose, do_branch=False, do_repo=False, do_tree=False):
Check multiple objects.

If errors occur they are accumulated and reported as far as possible, and an exception raised at the end of the process.

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.