~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Aaron Bentley
  • Date: 2007-06-17 17:07:04 UTC
  • mto: (2490.2.32 graphwalker)
  • mto: This revision was merged to the branch mainline in revision 2542.
  • Revision ID: aaron.bentley@utoronto.ca-20070617170704-z3xbz0t5nqddnyeo
Make topological sorting optional for get_ancestry

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
                [revision_a, revision_b])
254
254
            # Shortcut the case where one of the tips is already included in
255
255
            # the other graphs ancestry.
256
 
            ancestry_a = graph.get_ancestry(revision_a)
 
256
            ancestry_a = graph.get_ancestry(revision_a, topo_sorted=False)
257
257
            if revision_b in ancestry_a:
258
258
                return revision_b
259
 
            ancestry_b = graph.get_ancestry(revision_b)
 
259
            ancestry_b = graph.get_ancestry(revision_b, topo_sorted=False)
260
260
            if revision_a in ancestry_b:
261
261
                return revision_a
262
262
            # convert to a NULL_REVISION based graph.