Part of bzrlib
Class | DictParentsProvider | A parents provider for Graph objects. |
Class | StackedParentsProvider | A parents provider which stacks (or unions) multiple providers. |
Class | CachingParentsProvider | A parents provider which will cache the revision => parents as a dict. |
Class | CallableToParentsProviderAdapter | A parents provider that adapts any callable to the parents provider API. |
Class | Graph | Provide incremental access to revision graphs. |
Class | HeadsCache | A cache of results for graph heads calls. |
Class | FrozenHeadsCache | Cache heads() calls, assuming the caller won't modify them. |
Class | AbstractSearchResult | The result of a search, describing a set of keys. |
Class | AbstractSearch | A search that can be executed, producing a search result. |
Class | SearchResult | The result of a breadth first search. |
Class | PendingAncestryResult | A search result that will reconstruct the ancestry for some graph heads. |
Class | EmptySearchResult | An empty search result. |
Class | EverythingResult | A search result that simply requests everything in the repository. |
Class | EverythingNotInOther | Find all revisions in that are in one repo but not the other. |
Class | NotInOtherForRevs | Find all revisions missing in one repo for a some specific heads. |
Function | invert_parent_map | Given a map from child => parents, create a map of parent=>children |
Function | limited_search_result_from_parent_map | Transform a parent_map that is searching 'tip_keys' into an |
Function | search_result_from_parent_map | Transform a parent_map into SearchResult information. |
Function | collapse_linear_regions | Collapse regions of the graph that are 'linear'. |
Class | GraphThunkIdsToKeys | Forwards calls about 'ids' to be about keys internally. |
Class | _BreadthFirstSearcher | Parallel search breadth-first the ancestry of revisions. |
Function | _find_possible_heads | Walk backwards (towards children) through the parent_map. |
Function | _run_search | Given a parent map, run a _BreadthFirstSearcher on it. |
This finds 'heads' that will hopefully succinctly describe our search graph.
Start at heads, walk until you hit exclude_keys. As a further improvement, watch for any heads that you encounter while walking, which means they were not heads of the search.
This is mostly used to generate a succinct recipe for how to walk through most of parent_map.
Returns | (_BreadthFirstSearcher, set(heads_encountered_by_walking)) |
Transform a parent_map that is searching 'tip_keys' into an approximate SearchResult.
We should be able to generate a SearchResult from a given set of starting keys, that covers a subset of parent_map that has the last step pointing at tip_keys. This is to handle the case that really-long-searches shouldn't be started from scratch on each get_parent_map request, but we do want to filter out some of the keys that we've already seen, so we don't get information that we already know about on every request.
The server will validate the search (that starting at start_keys and stopping at stop_keys yields the exact key_count), so we have to be careful to give an exact recipe.
Parameters | parent_map | A map from {child_id: (parent_ids,)} |
missing_keys | parent_ids that we know are unavailable | |
tip_keys | the revision_ids that we are searching | |
depth | How far back to walk. |