~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Michael Hudson
  • Date: 2008-02-27 02:24:50 UTC
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: michael.hudson@canonical.com-20080227022450-5dosthv8fwjna72z
use less dumb method of filtering revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
    @with_branch_lock
654
654
    @with_bzrlib_read_lock
655
655
    def get_changes_uncached(self, revid_list):
656
 
        # Because we may loop and call get_revisions multiple times (to throw
657
 
        # out dud revids), we grab the bzrlib read lock.
658
 
        while True:
659
 
            try:
660
 
                rev_list = self._branch.repository.get_revisions(revid_list)
661
 
            except (KeyError, bzrlib.errors.NoSuchRevision), e:
662
 
                # this sometimes happens with arch-converted branches.
663
 
                # i don't know why. :(
664
 
                self.log.debug('No such revision (skipping): %s', e)
665
 
                revid_list.remove(e.revision)
666
 
            else:
667
 
                break
 
656
        repo = self._branch.repository
 
657
        rev_list = repo.get_revisions(
 
658
            repo.get_graph().get_parent_map(revid_list))
668
659
 
669
 
        return [self._change_from_revision(rev) for rev in rev_list]        
 
660
        return [self._change_from_revision(rev) for rev in rev_list]
670
661
 
671
662
    def _get_deltas_for_revisions_with_trees(self, revisions):
672
663
        """Produce a list of revision deltas.