~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: John Arbash Meinel
  • Date: 2007-11-30 14:52:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3061.
  • Revision ID: john@arbash-meinel.com-20071130145230-njpq31mmf39l2zow
deprecate revision.is_ancestor, update the callers and the tests.

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
141
    return branch.repository.get_graph().is_ancestor(candidate_id, revision_id)
140
142
 
141
143