~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Michael Hudson
  • Date: 2008-03-06 02:35:59 UTC
  • mto: This revision was merged to the branch mainline in revision 149.
  • Revision ID: michael.hudson@canonical.com-20080306023559-xl46e4ipgxw44zcf
use a list comprehension instead

Show diffs side-by-side

added added

removed removed

Lines of Context:
657
657
                            revid_list)
658
658
        repo = self._branch.repository
659
659
        parent_map = repo.get_graph().get_parent_map(revid_list)
660
 
        present_revids = filter(lambda revid:revid in parent_map, revid_list)
 
660
        # We need to return the answer in the same order as the input,
 
661
        # less any ghosts.
 
662
        present_revids = [revid for revid in revid_list
 
663
                          if revid in parent_map]
661
664
        rev_list = repo.get_revisions(present_revids)
662
665
 
663
666
        return [self._change_from_revision(rev) for rev in rev_list]