~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-31 16:12:57 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060731161257-91a231523255332c
new official bzr.ico

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