/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Martin Pool
  • Date: 2006-06-10 23:29:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1761.
  • Revision ID: mbp@sourcefrog.net-20060610232922-e8d8abcfb69dbb28
Restore removed fileid_involved* methods
They're still used by some plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
782
782
        # it's always possible even if they're on an unlistable transport.
783
783
        return self._revision_store.all_revision_ids(self.get_transaction())
784
784
 
 
785
    def fileid_involved_between_revs(self, from_revid, to_revid):
 
786
        """Find file_id(s) which are involved in the changes between revisions.
 
787
 
 
788
        This determines the set of revisions which are involved, and then
 
789
        finds all file ids affected by those revisions.
 
790
        """
 
791
        vf = self._get_revision_vf()
 
792
        from_set = set(vf.get_ancestry(from_revid))
 
793
        to_set = set(vf.get_ancestry(to_revid))
 
794
        changed = to_set.difference(from_set)
 
795
        return self._fileid_involved_by_set(changed)
 
796
 
 
797
    def fileid_involved(self, last_revid=None):
 
798
        """Find all file_ids modified in the ancestry of last_revid.
 
799
 
 
800
        :param last_revid: If None, last_revision() will be used.
 
801
        """
 
802
        if not last_revid:
 
803
            changed = set(self.all_revision_ids())
 
804
        else:
 
805
            changed = set(self.get_ancestry(last_revid))
 
806
        if None in changed:
 
807
            changed.remove(None)
 
808
        return self._fileid_involved_by_set(changed)
 
809
 
785
810
    @needs_read_lock
786
811
    def get_ancestry(self, revision_id):
787
812
        """Return a list of revision-ids integrated by a revision.