b.k._KnitAnnotator(annotate.Annotator) : class documentation

Part of bzrlib.knit View In Hierarchy

Build up the annotations for a text.
Method __init__ Undocumented
Method _get_build_graph Get the graphs for building texts and annotations.
Method _get_needed_texts Undocumented
Method _cache_delta_blocks Undocumented
Method _expand_record Undocumented
Method _get_parent_annotations_and_matches Get the list of annotations for the parent, and the matching lines.
Method _process_pending The content for 'key' was just processed.
Method _check_ready_for_annotations return true if this text is ready to be yielded.
Method _extract_texts Extract the various texts needed based on records
def __init__(self, vf):
Undocumented
def _get_build_graph(self, key):
Get the graphs for building texts and annotations.

The data you need for creating a full text may be different than the data you need to annotate that text. (At a minimum, you need both parents to create an annotation, but only need 1 parent to generate the fulltext.)

ReturnsA list of (key, index_memo) records, suitable for passing to read_records_iter to start reading in the raw data from the pack file.
def _get_needed_texts(self, key, pb=None):
Undocumented
def _cache_delta_blocks(self, key, compression_parent, delta, lines):
Undocumented
def _expand_record(self, key, parent_keys, compression_parent, record, record_details):
Undocumented
def _get_parent_annotations_and_matches(self, key, text, parent_key):
Get the list of annotations for the parent, and the matching lines.

:param text: The opaque value given by _get_needed_texts
:param parent_key: The key for the parent text
:return: (parent_annotations, matching_blocks)
    parent_annotations is a list as long as the number of lines in
        parent
    matching_blocks is a list of (parent_idx, text_idx, len) tuples
        indicating which lines match between the two texts
def _process_pending(self, key):
The content for 'key' was just processed.

Determine if there is any more pending work to be processed.

def _check_ready_for_annotations(self, key, parent_keys):
return true if this text is ready to be yielded.

Otherwise, this will return False, and queue the text into self._pending_annotation

def _extract_texts(self, records):
Extract the various texts needed based on records
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.