/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: Martin Pool
  • Date: 2009-03-13 07:46:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4189.
  • Revision ID: mbp@sourcefrog.net-20090313074626-i3ycz4wubq6nbiuw
Remove APIs deprecated up to and including 1.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
from bzrlib.inventory import Inventory, InventoryDirectory, ROOT_ID
54
54
from bzrlib.symbol_versioning import (
55
55
        deprecated_method,
56
 
        one_one,
57
 
        one_two,
58
 
        one_six,
59
56
        )
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)
1038
1035
 
1039
 
    @deprecated_method(one_two)
1040
 
    @needs_read_lock
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.
1043
 
        
1044
 
        These are returned in topological order.
1045
 
 
1046
 
        revision_id: only return revision ids included by revision_id.
1047
 
        """
1048
 
        keys =  self.search_missing_revision_ids(
1049
 
            other, revision_id, find_ghosts).get_keys()
1050
 
        other.lock_read()
1051
 
        try:
1052
 
            parents = other.get_graph().get_parent_map(keys)
1053
 
        finally:
1054
 
            other.unlock()
1055
 
        return tsort.topo_sort(parents)
1056
 
 
1057
1036
    @staticmethod
1058
1037
    def open(base):
1059
1038
        """Open the repository rooted at base.
1858
1837
        implicitly lock for the user.
1859
1838
        """
1860
1839
 
1861
 
    @needs_read_lock
1862
 
    @deprecated_method(one_six)
1863
 
    def print_file(self, file, revision_id):
1864
 
        """Print `file` to stdout.
1865
 
        
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.
1869
 
        """
1870
 
        tree = self.revision_tree(revision_id)
1871
 
        # use inventory as it was in that revision
1872
 
        file_id = tree.inventory.path2id(file)
1873
 
        if not file_id:
1874
 
            # TODO: jam 20060427 Write a test for this code path
1875
 
            #       it had a bug in it, and was raising the wrong
1876
 
            #       exception.
1877
 
            raise errors.BzrError("%r is not present in revision %s" % (file, revision_id))
1878
 
        tree.print_file(file_id)
1879
 
 
1880
1840
    def get_transaction(self):
1881
1841
        return self.control_files.get_transaction()
1882
1842
 
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]
1888
 
 
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
2593
2547
                break
2594
2548
        return searcher.get_result()
2595
2549
 
2596
 
    @deprecated_method(one_two)
2597
 
    @needs_read_lock
2598
 
    def missing_revision_ids(self, revision_id=None, find_ghosts=True):
2599
 
        """Return the revision ids that source has that target does not.
2600
 
        
2601
 
        These are returned in topological order.
2602
 
 
2603
 
        :param revision_id: only return revision ids included by this
2604
 
                            revision_id.
2605
 
        :param find_ghosts: If True find missing revisions in deep history
2606
 
            rather than just finding the surface difference.
2607
 
        """
2608
 
        return list(self.search_missing_revision_ids(
2609
 
            revision_id, find_ghosts).get_keys())
2610
 
 
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.