/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-24 01:08:12 UTC
  • mfrom: (3948.3.9 deprecation)
  • Revision ID: pqm@pqm.ubuntu.com-20090324010812-lrfx6zoeu7q0fftv
(mbp) remove code deprecated up to 1.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
from bzrlib import registry
58
58
from bzrlib.symbol_versioning import (
59
59
        deprecated_method,
60
 
        one_one,
61
 
        one_two,
62
 
        one_six,
63
60
        )
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)
1309
1306
 
1310
 
    @deprecated_method(one_two)
1311
 
    @needs_read_lock
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.
1314
 
 
1315
 
        These are returned in topological order.
1316
 
 
1317
 
        revision_id: only return revision ids included by revision_id.
1318
 
        """
1319
 
        keys =  self.search_missing_revision_ids(
1320
 
            other, revision_id, find_ghosts).get_keys()
1321
 
        other.lock_read()
1322
 
        try:
1323
 
            parents = other.get_graph().get_parent_map(keys)
1324
 
        finally:
1325
 
            other.unlock()
1326
 
        return tsort.topo_sort(parents)
1327
 
 
1328
1307
    @staticmethod
1329
1308
    def open(base):
1330
1309
        """Open the repository rooted at base.
2253
2232
        implicitly lock for the user.
2254
2233
        """
2255
2234
 
2256
 
    @needs_read_lock
2257
 
    @deprecated_method(one_six)
2258
 
    def print_file(self, file, revision_id):
2259
 
        """Print `file` to stdout.
2260
 
 
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.
2264
 
        """
2265
 
        tree = self.revision_tree(revision_id)
2266
 
        # use inventory as it was in that revision
2267
 
        file_id = tree.inventory.path2id(file)
2268
 
        if not file_id:
2269
 
            # TODO: jam 20060427 Write a test for this code path
2270
 
            #       it had a bug in it, and was raising the wrong
2271
 
            #       exception.
2272
 
            raise errors.BzrError("%r is not present in revision %s" % (file, revision_id))
2273
 
        tree.print_file(file_id)
2274
 
 
2275
2235
    def get_transaction(self):
2276
2236
        return self.control_files.get_transaction()
2277
2237
 
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]
2283
 
 
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
3047
3001
                break
3048
3002
        return searcher.get_result()
3049
3003
 
3050
 
    @deprecated_method(one_two)
3051
 
    @needs_read_lock
3052
 
    def missing_revision_ids(self, revision_id=None, find_ghosts=True):
3053
 
        """Return the revision ids that source has that target does not.
3054
 
 
3055
 
        These are returned in topological order.
3056
 
 
3057
 
        :param revision_id: only return revision ids included by this
3058
 
                            revision_id.
3059
 
        :param find_ghosts: If True find missing revisions in deep history
3060
 
            rather than just finding the surface difference.
3061
 
        """
3062
 
        return list(self.search_missing_revision_ids(
3063
 
            revision_id, find_ghosts).get_keys())
3064
 
 
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.