~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/repository.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-26 08:05:45 UTC
  • mfrom: (5916 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5917.
  • Revision ID: john@arbash-meinel.com-20110526080545-5tprxfczyj4bfk0o
Merge bzr.dev 5916 and make sure the right patch is applied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
 
30
import itertools
 
31
 
30
32
from bzrlib import (
31
33
    xml5,
32
34
    graph as _mod_graph,
817
819
    @needs_read_lock
818
820
    def search_missing_revision_ids(self,
819
821
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
820
 
            find_ghosts=True, revision_ids=None, if_present_ids=None):
 
822
            find_ghosts=True, revision_ids=None, if_present_ids=None,
 
823
            limit=None):
821
824
        """See InterRepository.search_missing_revision_ids()."""
822
825
        # we want all revisions to satisfy revision_id in source.
823
826
        # but we don't want to stat every file here and there.
863
866
            # that against the revision records.
864
867
            result_set = set(
865
868
                self.source._eliminate_revisions_not_present(required_revisions))
 
869
        if limit is not None:
 
870
            topo_ordered = self.get_graph().iter_topo_order(result_set)
 
871
            result_set = set(itertools.islice(topo_ordered, limit))
866
872
        return self.source.revision_ids_to_search_result(result_set)
867
873
 
868
874