~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rev_storage.py

  • Committer: Aaron Bentley
  • Date: 2005-11-17 05:14:54 UTC
  • mto: (1185.65.14 storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051117051454-e9ac1dd13766b978
Moved get_ancestry to RevisionStorage

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
            inv = self.get_revision_inventory(revision_id)
206
206
            return RevisionTree(self.weave_store, inv, revision_id)
207
207
 
 
208
    def get_ancestry(self, revision_id):
 
209
        """Return a list of revision-ids integrated by a revision.
 
210
        
 
211
        This is topologically sorted.
 
212
        """
 
213
        if revision_id is None:
 
214
            return [None]
 
215
        w = self.get_inventory_weave()
 
216
        return [None] + map(w.idx_to_name,
 
217
                            w.inclusions([w.lookup(revision_id)]))
 
218
 
208
219
    @needs_read_lock
209
220
    def print_file(self, file, revision_id):
210
221
        """Print `file` to stdout."""