~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Robert Collins
  • Date: 2006-08-01 04:54:43 UTC
  • mfrom: (1864.6.1 plugin-imports)
  • mto: This revision was merged to the branch mainline in revision 1901.
  • Revision ID: robertc@robertcollins.net-20060801045443-b99468f4250e01c4
Merge Johns bug 51810 fixup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
NULL_REVISION="null:"
30
30
 
31
 
 
32
31
class Revision(object):
33
32
    """Single revision on a branch.
34
33
 
118
117
    revisions_source is an object supporting a get_revision operation that
119
118
    behaves like Branch's.
120
119
    """
121
 
    return (candidate_id in branch.repository.get_ancestry(revision_id))
 
120
    return candidate_id in branch.repository.get_ancestry(revision_id)
122
121
 
123
122
 
124
123
def iter_ancestors(revision_id, revision_source, only_present=False):
154
153
    anc_iter = enumerate(iter_ancestors(revision_id, revision_source,
155
154
                         only_present=True))
156
155
    for anc_order, (anc_id, anc_distance) in anc_iter:
157
 
        if anc_id not in found_ancestors:
 
156
        if not found_ancestors.has_key(anc_id):
158
157
            found_ancestors[anc_id] = (anc_order, anc_distance)
159
158
    return found_ancestors
160
159