53
53
from bzrlib.inventory import Inventory, InventoryDirectory, ROOT_ID
54
54
from bzrlib.symbol_versioning import (
60
57
from bzrlib.trace import (
61
58
log_exception_quietly, note, mutter, mutter_callsite, warning)
1036
1033
return InterRepository.get(other, self).search_missing_revision_ids(
1037
1034
revision_id, find_ghosts)
1039
@deprecated_method(one_two)
1041
def missing_revision_ids(self, other, revision_id=None, find_ghosts=True):
1042
"""Return the revision ids that other has that this does not.
1044
These are returned in topological order.
1046
revision_id: only return revision ids included by revision_id.
1048
keys = self.search_missing_revision_ids(
1049
other, revision_id, find_ghosts).get_keys()
1052
parents = other.get_graph().get_parent_map(keys)
1055
return tsort.topo_sort(parents)
1058
1037
def open(base):
1059
1038
"""Open the repository rooted at base.
1858
1837
implicitly lock for the user.
1862
@deprecated_method(one_six)
1863
def print_file(self, file, revision_id):
1864
"""Print `file` to stdout.
1866
FIXME RBC 20060125 as John Meinel points out this is a bad api
1867
- it writes to stdout, it assumes that that is valid etc. Fix
1868
by creating a new more flexible convenience function.
1870
tree = self.revision_tree(revision_id)
1871
# use inventory as it was in that revision
1872
file_id = tree.inventory.path2id(file)
1874
# TODO: jam 20060427 Write a test for this code path
1875
# it had a bug in it, and was raising the wrong
1877
raise errors.BzrError("%r is not present in revision %s" % (file, revision_id))
1878
tree.print_file(file_id)
1880
1840
def get_transaction(self):
1881
1841
return self.control_files.get_transaction()
1883
@deprecated_method(one_one)
1884
def get_parents(self, revision_ids):
1885
"""See StackedParentsProvider.get_parents"""
1886
parent_map = self.get_parent_map(revision_ids)
1887
return [parent_map.get(r, None) for r in revision_ids]
1889
1843
def get_parent_map(self, revision_ids):
1890
1844
"""See graph._StackedParentsProvider.get_parent_map"""
1891
1845
# revisions index works in keys; this just works in revisions
2594
2548
return searcher.get_result()
2596
@deprecated_method(one_two)
2598
def missing_revision_ids(self, revision_id=None, find_ghosts=True):
2599
"""Return the revision ids that source has that target does not.
2601
These are returned in topological order.
2603
:param revision_id: only return revision ids included by this
2605
:param find_ghosts: If True find missing revisions in deep history
2606
rather than just finding the surface difference.
2608
return list(self.search_missing_revision_ids(
2609
revision_id, find_ghosts).get_keys())
2611
2550
@needs_read_lock
2612
2551
def search_missing_revision_ids(self, revision_id=None, find_ghosts=True):
2613
2552
"""Return the revision ids that source has that target does not.