b.r.RepoReconciler(object) : class documentation

Part of bzrlib.reconcile View In Hierarchy

Known subclasses: bzrlib.reconcile.KnitReconciler, bzrlib.reconcile.PackReconciler

Reconciler that reconciles a repository.

The goal of repository reconciliation is to make any derived data consistent with the core data committed by a user. This can involve reindexing, or removing unreferenced data if that can interfere with queries in a given repository.

Currently this consists of an inventory reweave with revision cross-checks.

Method __init__ Construct a RepoReconciler.
Method reconcile Perform reconciliation.
Method _reconcile Undocumented
Method _reconcile_steps Perform the steps to reconcile this repository.
Method _reweave_inventory Regenerate the inventory weave for the repository from scratch.
Method _new_inv_parents Lookup ghost-filtered parents for revision_key.
Method _change_inv_parents Adapt a record stream to reconcile the parents.
Method _setup_steps Setup the markers we need to control the progress bar.
Method _graph_revision Load a revision into the revision graph.
Method _check_garbage_inventories Check for garbage inventories which we cannot trust
Method _parent_is_available True if parent is a fully available revision
Method _reweave_step Mark a single step of regeneration complete.
def __init__(self, repo, other=None, thorough=False):
Construct a RepoReconciler.
Parametersthoroughperform a thorough check which may take longer but will correct non-data loss issues such as incorrect cached data.
def reconcile(self):

Perform reconciliation.

After reconciliation the following attributes document found issues:

  • inconsistent_parents: The number of revisions in the repository whose ancestry was being reported incorrectly.
  • garbage_inventories: The number of inventory objects without revisions that were garbage collected.
def _reconcile(self):
Undocumented
def _reconcile_steps(self):
Perform the steps to reconcile this repository.
def _reweave_inventory(self):
Regenerate the inventory weave for the repository from scratch.

This is a smart function: it will only do the reweave if doing it will correct data issues. The self.thorough flag controls whether only data-loss causing issues (!self.thorough) or all issues (self.thorough) are treated as requiring the reweave.

def _new_inv_parents(self, revision_key):
Lookup ghost-filtered parents for revision_key.
def _change_inv_parents(self, stream, get_parents, all_revision_keys):
Adapt a record stream to reconcile the parents.
def _setup_steps(self, new_total):
Setup the markers we need to control the progress bar.
def _graph_revision(self, rev_id):
Load a revision into the revision graph.
def _check_garbage_inventories(self):
Check for garbage inventories which we cannot trust

We cant trust them because their pre-requisite file data may not be present - all we know is that their revision was not installed.

def _parent_is_available(self, parent):
True if parent is a fully available revision

A fully available revision has a inventory and a revision object in the repository.

def _reweave_step(self, message):
Mark a single step of regeneration complete.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.