~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Robert Collins
  • Date: 2007-06-28 02:43:50 UTC
  • mfrom: (2553 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2558.
  • Revision ID: robertc@robertcollins.net-20070628024350-z8bdm0y6yz2uyf4o
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
    revisions_source is an object supporting a get_revision operation that
125
125
    behaves like Branch's.
126
126
    """
127
 
    return (candidate_id in branch.repository.get_ancestry(revision_id))
 
127
    return (candidate_id in branch.repository.get_ancestry(revision_id,
 
128
            topo_sorted=False))
128
129
 
129
130
 
130
131
def iter_ancestors(revision_id, revision_source, only_present=False):
258
259
                [revision_a, revision_b])
259
260
            # Shortcut the case where one of the tips is already included in
260
261
            # the other graphs ancestry.
261
 
            ancestry_a = graph.get_ancestry(revision_a)
 
262
            ancestry_a = graph.get_ancestry(revision_a, topo_sorted=False)
262
263
            if revision_b in ancestry_a:
263
264
                return revision_b
264
 
            ancestry_b = graph.get_ancestry(revision_b)
 
265
            ancestry_b = graph.get_ancestry(revision_b, topo_sorted=False)
265
266
            if revision_a in ancestry_b:
266
267
                return revision_a
267
268
            # convert to a NULL_REVISION based graph.