Part of bzrlib.knit View In Hierarchy
Method | __init__ | Construct a KnitGraphIndex on a graph_index. |
Method | __repr__ | Undocumented |
Method | add_records | Add multiple records to the index. |
Method | scan_unvalidated_index | Inform this _KnitGraphIndex that there is an unvalidated index. |
Method | get_missing_compression_parents | Return the keys of missing compression parents. |
Method | get_missing_parents | Return the keys of missing parents. |
Method | get_build_details | Get the method, index_memo and compression parent for version_ids. |
Method | get_method | Return compression method of specified key. |
Method | get_options | Return a list representing options. |
Method | find_ancestry | See CombinedGraphIndex.find_ancestry() |
Method | get_parent_map | Get a map of the parents of keys. |
Method | get_position | Return details needed to access the version. |
Method | keys | Get all the keys in the collection. |
Method | _check_read | raise if reads are not permitted. |
Method | _check_write_ok | Assert if writes are not permitted. |
Method | _compression_parent | Undocumented |
Method | _get_entries | Get the entries for keys. |
Method | _get_method | Undocumented |
Method | _get_node | Undocumented |
Method | _node_to_position | Convert an index value to position details. |
Method | _sort_keys_by_io | Figure out an optimal order to read the records for the given keys. |
Parameters | graph_index | An implementation of bzrlib.index.GraphIndex. |
is_locked | A callback to check whether the object should answer queries. | |
deltas | Allow delta-compressed records. | |
parents | If True, record knits parents, if not do not record parents. | |
add_callback | If not None, allow additions to the index and call this callback with a list of added GraphIndex nodes: [(node, value, node_refs), ...] | |
is_locked | A callback, returns True if the index is locked and thus usable. | |
track_external_parent_refs | If True, record all external parent references parents from added records. These can be retrieved later by calling get_missing_parents(). |
This function does not insert data into the Immutable GraphIndex backing the KnitGraphIndex, instead it prepares data for insertion by the caller and checks that it is safe to insert then calls self._add_callback with the prepared GraphIndex nodes.
Parameters | records | a list of tuples: (key, options, access_memo, parents). |
random_id | If True the ids being added were randomly generated and no check for existence will be performed. | |
missing_compression_parents | If True the records being added are only compressed against texts already in the index (or inside records). If False the records all refer to unavailable texts (or texts inside records) as compression parents. |
This allows this _KnitGraphIndex to keep track of any missing compression parents we may want to have filled in to make those indices valid.
Parameters | graph_index | A GraphIndex |
Missing compression parents occur when a record stream was missing basis texts, or a index was scanned that had missing basis texts.
Get the method, index_memo and compression parent for version_ids. Ghosts are omitted from the result. :param keys: An iterable of keys. :return: A dict of key: (index_memo, compression_parent, parents, record_details). index_memo opaque structure to pass to read_records to extract the raw data compression_parent Content that this record is built upon, may be None parents Logical parents of this node record_details extra information about the content which needs to be passed to Factory.parse_record
Parameters | keys | An iterable of index key tuples. |
Parameters | keys | The keys to look up parents for. |
Returns | A mapping from keys to parents. Absent keys are absent from the mapping. |
Returns | a tuple (index, data position, size) to hand to the access logic to get the record. |
Sort keys, grouped by index and sorted by position.
Parameters | keys | A list of keys whose records we want to read. This will be sorted 'in-place'. |
positions | A dict, such as the one returned by _get_components_positions() | |
Returns | None |