~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
from bzrlib.tree import EmptyTree, RevisionTree
53
53
from bzrlib.repository import Repository
54
54
from bzrlib.revision import (
55
 
                             get_intervening_revisions,
56
55
                             is_ancestor,
57
56
                             NULL_REVISION,
58
57
                             Revision,
1098
1097
        finally:
1099
1098
            other.unlock()
1100
1099
 
1101
 
    @deprecated_method(zero_eight)
1102
 
    def pullable_revisions(self, other, stop_revision):
1103
 
        """Please use bzrlib.missing instead."""
1104
 
        other_revno = other.revision_id_to_revno(stop_revision)
1105
 
        try:
1106
 
            return self.missing_revisions(other, other_revno)
1107
 
        except DivergedBranches, e:
1108
 
            try:
1109
 
                pullable_revs = get_intervening_revisions(self.last_revision(),
1110
 
                                                          stop_revision, 
1111
 
                                                          self.repository)
1112
 
                assert self.last_revision() not in pullable_revs
1113
 
                return pullable_revs
1114
 
            except bzrlib.errors.NotAncestor:
1115
 
                if is_ancestor(self.last_revision(), stop_revision, self):
1116
 
                    return []
1117
 
                else:
1118
 
                    raise e
1119
 
        
1120
1100
    def basis_tree(self):
1121
1101
        """See Branch.basis_tree."""
1122
1102
        return self.repository.revision_tree(self.last_revision())