~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.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:
86
86
        return self._fileid_involved_by_set(changed)
87
87
 
88
88
    @needs_read_lock
89
 
    def get_ancestry(self, revision_id):
 
89
    def get_ancestry(self, revision_id, topo_sorted=True):
90
90
        """Return a list of revision-ids integrated by a revision.
91
91
        
92
 
        This is topologically sorted.
 
92
        This is topologically sorted, unless 'sorted' is specified as False
93
93
        """
94
94
        if revision_id is None:
95
95
            return [None]
96
96
        revision_id = osutils.safe_revision_id(revision_id)
97
97
        vf = self._get_revision_vf()
98
98
        try:
99
 
            return [None] + vf.get_ancestry(revision_id)
 
99
            return [None] + vf.get_ancestry(revision_id, topo_sorted)
100
100
        except errors.RevisionNotPresent:
101
101
            raise errors.NoSuchRevision(self, revision_id)
102
102