~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Martin Pool
  • Date: 2006-05-26 03:15:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1761.
  • Revision ID: mbp@sourcefrog.net-20060526031522-970db55990f75b16
Remove obsolete fileid_involved from KnitRepository, fix error message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
                                         RepositoryFormat6,
323
323
                                         RepositoryFormat7,
324
324
                                         RepositoryFormatKnit1)), \
325
 
            "fileid_involved only supported for branches which store inventory as unnested xml"
 
325
            ("fileids_altered_by_revision_ids only supported for branches " 
 
326
             "which store inventory as unnested xml, not on %r" % self)
326
327
        selected_revision_ids = set(revision_ids)
327
328
        w = self.get_inventory_weave()
328
329
        result = {}
666
667
        """See Repository.all_revision_ids()."""
667
668
        return self._revision_store.all_revision_ids(self.get_transaction())
668
669
 
669
 
    def fileid_involved_between_revs(self, from_revid, to_revid):
670
 
        """Find file_id(s) which are involved in the changes between revisions.
671
 
 
672
 
        This determines the set of revisions which are involved, and then
673
 
        finds all file ids affected by those revisions.
674
 
        """
675
 
        vf = self._get_revision_vf()
676
 
        from_set = set(vf.get_ancestry(from_revid))
677
 
        to_set = set(vf.get_ancestry(to_revid))
678
 
        changed = to_set.difference(from_set)
679
 
        return self._fileid_involved_by_set(changed)
680
 
 
681
 
    def fileid_involved(self, last_revid=None):
682
 
        """Find all file_ids modified in the ancestry of last_revid.
683
 
 
684
 
        :param last_revid: If None, last_revision() will be used.
685
 
        """
686
 
        if not last_revid:
687
 
            changed = set(self.all_revision_ids())
688
 
        else:
689
 
            changed = set(self.get_ancestry(last_revid))
690
 
        if None in changed:
691
 
            changed.remove(None)
692
 
        return self._fileid_involved_by_set(changed)
693
 
 
694
670
    @needs_read_lock
695
671
    def get_ancestry(self, revision_id):
696
672
        """Return a list of revision-ids integrated by a revision.