~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Andrew Bennetts
  • Date: 2007-07-02 05:05:25 UTC
  • mto: (2535.4.4 streaming-smart-fetch)
  • mto: This revision was merged to the branch mainline in revision 2906.
  • Revision ID: andrew.bennetts@canonical.com-20070702050525-hm8jsms363l9k1b3
Move some "what repo data to fetch logic" from RepoFetcher to Repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
616
616
            pb.finished()
617
617
        return result
618
618
 
 
619
    def get_data_about_revision_ids(self, revision_ids):
 
620
        """Get an iterable about data for a given set of revision IDs.
 
621
 
 
622
        The named data will be ordered so that it can be fetched and inserted in
 
623
        that order safely.
 
624
        
 
625
        :returns: (knit-kind, file-id, versions)
 
626
        """
 
627
        # XXX: it's a bit weird to control the inventory weave caching in this
 
628
        # generator.  Ideally the caching would be done in fetch.py I think.
 
629
        inv_w = self.get_inventory_weave()
 
630
        inv_w.enable_cache()
 
631
 
 
632
        # file ids that changed
 
633
        file_ids = self.fileids_altered_by_revision_ids(revision_ids)
 
634
        for file_id, altered_versions in file_ids.iteritems():
 
635
            yield ("file", file_id, altered_versions)
 
636
 
 
637
        # inventory
 
638
        yield ("inventory", None, revision_ids)
 
639
        inv_w.clear_cache()
 
640
 
 
641
        # signatures
 
642
        # XXX
 
643
 
 
644
        # revisions
 
645
        yield ("revisions", None, revision_ids)
 
646
 
 
647
 
619
648
    @needs_read_lock
620
649
    def get_inventory_weave(self):
621
650
        return self.control_weaves.get_weave('inventory',