~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-31 18:18:09 UTC
  • mfrom: (1978 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060831181809-0097f4d21cb944fd
[merge] bzr.dev 1978

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    revisions_source is an object supporting a get_revision operation that
119
119
    behaves like Branch's.
120
120
    """
121
 
    return candidate_id in branch.repository.get_ancestry(revision_id)
 
121
    return (candidate_id in branch.repository.get_ancestry(revision_id))
122
122
 
123
123
 
124
124
def iter_ancestors(revision_id, revision_source, only_present=False):
154
154
    anc_iter = enumerate(iter_ancestors(revision_id, revision_source,
155
155
                         only_present=True))
156
156
    for anc_order, (anc_id, anc_distance) in anc_iter:
157
 
        if not found_ancestors.has_key(anc_id):
 
157
        if anc_id not in found_ancestors:
158
158
            found_ancestors[anc_id] = (anc_order, anc_distance)
159
159
    return found_ancestors
160
160