57
57
from bzrlib import registry
58
58
from bzrlib.symbol_versioning import (
64
61
from bzrlib.trace import (
65
62
log_exception_quietly, note, mutter, mutter_callsite, warning)
1307
1304
return InterRepository.get(other, self).search_missing_revision_ids(
1308
1305
revision_id, find_ghosts)
1310
@deprecated_method(one_two)
1312
def missing_revision_ids(self, other, revision_id=None, find_ghosts=True):
1313
"""Return the revision ids that other has that this does not.
1315
These are returned in topological order.
1317
revision_id: only return revision ids included by revision_id.
1319
keys = self.search_missing_revision_ids(
1320
other, revision_id, find_ghosts).get_keys()
1323
parents = other.get_graph().get_parent_map(keys)
1326
return tsort.topo_sort(parents)
1329
1308
def open(base):
1330
1309
"""Open the repository rooted at base.
2253
2232
implicitly lock for the user.
2257
@deprecated_method(one_six)
2258
def print_file(self, file, revision_id):
2259
"""Print `file` to stdout.
2261
FIXME RBC 20060125 as John Meinel points out this is a bad api
2262
- it writes to stdout, it assumes that that is valid etc. Fix
2263
by creating a new more flexible convenience function.
2265
tree = self.revision_tree(revision_id)
2266
# use inventory as it was in that revision
2267
file_id = tree.inventory.path2id(file)
2269
# TODO: jam 20060427 Write a test for this code path
2270
# it had a bug in it, and was raising the wrong
2272
raise errors.BzrError("%r is not present in revision %s" % (file, revision_id))
2273
tree.print_file(file_id)
2275
2235
def get_transaction(self):
2276
2236
return self.control_files.get_transaction()
2278
@deprecated_method(one_one)
2279
def get_parents(self, revision_ids):
2280
"""See StackedParentsProvider.get_parents"""
2281
parent_map = self.get_parent_map(revision_ids)
2282
return [parent_map.get(r, None) for r in revision_ids]
2284
2238
def get_parent_map(self, revision_ids):
2285
2239
"""See graph._StackedParentsProvider.get_parent_map"""
2286
2240
# revisions index works in keys; this just works in revisions
3048
3002
return searcher.get_result()
3050
@deprecated_method(one_two)
3052
def missing_revision_ids(self, revision_id=None, find_ghosts=True):
3053
"""Return the revision ids that source has that target does not.
3055
These are returned in topological order.
3057
:param revision_id: only return revision ids included by this
3059
:param find_ghosts: If True find missing revisions in deep history
3060
rather than just finding the surface difference.
3062
return list(self.search_missing_revision_ids(
3063
revision_id, find_ghosts).get_keys())
3065
3004
@needs_read_lock
3066
3005
def search_missing_revision_ids(self, revision_id=None, find_ghosts=True):
3067
3006
"""Return the revision ids that source has that target does not.