~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-21 02:33:43 UTC
  • mfrom: (2530.1.1 get_ancestry_no_topo)
  • mto: This revision was merged to the branch mainline in revision 2542.
  • Revision ID: aaron.bentley@utoronto.ca-20070621023343-3f3oy8iszatpjcui
Merge of not-sorting-ancestry branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        return self._fileid_involved_by_set(changed)
112
112
 
113
113
    @needs_read_lock
114
 
    def get_ancestry(self, revision_id):
 
114
    def get_ancestry(self, revision_id, topo_sorted=True):
115
115
        """Return a list of revision-ids integrated by a revision.
116
116
        
117
 
        This is topologically sorted.
 
117
        This is topologically sorted, unless 'topo_sorted' is specified as
 
118
        False.
118
119
        """
119
120
        if revision_id is None:
120
121
            return [None]
121
122
        revision_id = osutils.safe_revision_id(revision_id)
122
123
        vf = self._get_revision_vf()
123
124
        try:
124
 
            return [None] + vf.get_ancestry(revision_id)
 
125
            return [None] + vf.get_ancestry(revision_id, topo_sorted)
125
126
        except errors.RevisionNotPresent:
126
127
            raise errors.NoSuchRevision(self, revision_id)
127
128