/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 19:35:39 UTC
  • mfrom: (4086.1.4 hpss-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090306193539-h0q6dlyayhgcehta
(robertc, andrew) Add Branch.get_tags_dict RPC;
        Add optional 'fetch_spec' argument to Repository.fetch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    the logic in InterRepository.fetch().
71
71
    """
72
72
 
73
 
    def __init__(self, to_repository, from_repository, last_revision=None, pb=None,
74
 
        find_ghosts=True):
 
73
    def __init__(self, to_repository, from_repository, last_revision=None,
 
74
        pb=None, find_ghosts=True, fetch_spec=None):
75
75
        """Create a repo fetcher.
76
76
 
77
77
        :param find_ghosts: If True search the entire history for ghosts.
89
89
        self.sink = to_repository._get_sink()
90
90
        # must not mutate self._last_revision as its potentially a shared instance
91
91
        self._last_revision = last_revision
 
92
        self._fetch_spec = fetch_spec
92
93
        self.find_ghosts = find_ghosts
93
94
        if pb is None:
94
95
            self.pb = bzrlib.ui.ui_factory.nested_progress_bar()
176
177
 
177
178
        If no revisions need to be fetched, then this just returns None.
178
179
        """
 
180
        if self._fetch_spec is not None:
 
181
            return self._fetch_spec
179
182
        mutter('fetch up to rev {%s}', self._last_revision)
180
183
        if self._last_revision is NULL_REVISION:
181
184
            # explicit limit of no revisions needed