1024
1024
raise NotImplementedError(self.revision_trees)
1027
@symbol_versioning.deprecated_method(
1028
symbol_versioning.deprecated_in((2, 4, 0)))
1029
def get_ancestry(self, revision_id, topo_sorted=True):
1030
"""Return a list of revision-ids integrated by a revision.
1032
The first element of the list is always None, indicating the origin
1033
revision. This might change when we have history horizons, or
1034
perhaps we should have a new API.
1036
This is topologically sorted.
1038
if 'evil' in debug.debug_flags:
1039
mutter_callsite(2, "get_ancestry is linear with history.")
1040
if _mod_revision.is_null(revision_id):
1042
if not self.has_revision(revision_id):
1043
raise errors.NoSuchRevision(self, revision_id)
1044
graph = self.get_graph()
1046
search = graph._make_breadth_first_searcher([revision_id])
1049
found, ghosts = search.next_with_ghosts()
1050
except StopIteration:
1053
if _mod_revision.NULL_REVISION in keys:
1054
keys.remove(_mod_revision.NULL_REVISION)
1056
parent_map = graph.get_parent_map(keys)
1057
keys = tsort.topo_sort(parent_map)
1058
return [None] + list(keys)
1060
1026
def pack(self, hint=None, clean_obsolete_packs=False):
1061
1027
"""Compress the data within the repository.