~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-20 13:28:35 UTC
  • mfrom: (5852.1.11 fetch-limit)
  • Revision ID: pqm@pqm.ubuntu.com-20110520132835-3rf01eu5mbkz3zos
(jelmer) Add limit argument to Branch.fetch(). (Jelmer Vernooij)

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
19
20
import time
20
21
 
21
22
from bzrlib import (
584
585
    @needs_read_lock
585
586
    def search_missing_revision_ids(self, other,
586
587
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
587
 
            find_ghosts=True, revision_ids=None, if_present_ids=None):
 
588
            find_ghosts=True, revision_ids=None, if_present_ids=None,
 
589
            limit=None):
588
590
        """Return the revision ids that other has that this does not.
589
591
 
590
592
        These are returned in topological order.
603
605
                revision_ids = [revision_id]
604
606
        return InterRepository.get(other, self).search_missing_revision_ids(
605
607
            find_ghosts=find_ghosts, revision_ids=revision_ids,
606
 
            if_present_ids=if_present_ids)
 
608
            if_present_ids=if_present_ids, limit=limit)
607
609
 
608
610
    @staticmethod
609
611
    def open(base):
1711
1713
    @needs_read_lock
1712
1714
    def search_missing_revision_ids(self,
1713
1715
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
1714
 
            find_ghosts=True, revision_ids=None, if_present_ids=None):
 
1716
            find_ghosts=True, revision_ids=None, if_present_ids=None,
 
1717
            limit=None):
1715
1718
        """Return the revision ids that source has that target does not.
1716
1719
 
1717
1720
        :param revision_id: only return revision ids included by this
1725
1728
            to fetch for tags, which may reference absent revisions.
1726
1729
        :param find_ghosts: If True find missing revisions in deep history
1727
1730
            rather than just finding the surface difference.
 
1731
        :param limit: Maximum number of revisions to return, topologically
 
1732
            ordered
1728
1733
        :return: A bzrlib.graph.SearchResult.
1729
1734
        """
1730
1735
        raise NotImplementedError(self.search_missing_revision_ids)