/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/revision.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        return self.properties.get('author', self.committer)
126
126
 
127
127
 
 
128
@deprecated_function(symbol_versioning.zero_ninetythree)
128
129
def is_ancestor(revision_id, candidate_id, branch):
129
130
    """Return true if candidate_id is an ancestor of revision_id.
130
131
 
133
134
    
134
135
    revisions_source is an object supporting a get_revision operation that
135
136
    behaves like Branch's.
 
137
 
 
138
    This function is deprecated, it is better for callers to directly use
 
139
    Graph.is_ancestor() (just watch out that the parameter order is switched)
136
140
    """
137
 
    if is_null(candidate_id):
138
 
        return True
139
 
    return (candidate_id in branch.repository.get_ancestry(revision_id,
140
 
            topo_sorted=False))
 
141
    return branch.repository.get_graph().is_ancestor(candidate_id, revision_id)
141
142
 
142
143
 
143
144
def iter_ancestors(revision_id, revision_source, only_present=False):