~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.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:
16
16
 
17
17
from bzrlib.lazy_import import lazy_import
18
18
lazy_import(globals(), """
 
19
import itertools
 
20
 
19
21
from bzrlib import (
20
22
    bzrdir,
21
23
    errors,
507
509
    @needs_read_lock
508
510
    def search_missing_revision_ids(self,
509
511
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
510
 
            find_ghosts=True, revision_ids=None, if_present_ids=None):
 
512
            find_ghosts=True, revision_ids=None, if_present_ids=None,
 
513
            limit=None):
511
514
        """See InterRepository.search_missing_revision_ids()."""
512
515
        if symbol_versioning.deprecated_passed(revision_id):
513
516
            symbol_versioning.warn(
542
545
            # that against the revision records.
543
546
            result_set = set(
544
547
                self.source._eliminate_revisions_not_present(required_revisions))
 
548
        if limit is not None:
 
549
            topo_ordered = self.source.get_graph().iter_topo_order(result_set)
 
550
            result_set = set(itertools.islice(topo_ordered, limit))
545
551
        return self.source.revision_ids_to_search_result(result_set)
546
552
 
547
553