/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

 * ``InterRepository.missing_revision_ids`` is now deprecated in favour of
   ``InterRepository.search_missing_revision_ids`` which returns a 
   ``bzrlib.graph.SearchResult`` suitable for making requests from the smart
   server. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
import bzrlib
35
35
import bzrlib.errors as errors
36
 
from bzrlib.errors import (InstallFailed,
37
 
                           )
 
36
from bzrlib.errors import InstallFailed
 
37
from bzrlib.graph import SearchResult
38
38
from bzrlib.progress import ProgressPhase
39
39
from bzrlib.revision import is_null, NULL_REVISION
40
40
from bzrlib.symbol_versioning import (deprecated_function,
133
133
        pp = ProgressPhase('Transferring', 4, self.pb)
134
134
        try:
135
135
            pp.next_phase()
136
 
            revs = self._revids_to_fetch()
137
 
            if revs is None:
 
136
            revs = self._revids_to_fetch().get_keys()
 
137
            if not revs:
138
138
                return
139
139
            self._fetch_everything_for_revisions(revs, pp)
140
140
        finally:
194
194
        mutter('fetch up to rev {%s}', self._last_revision)
195
195
        if self._last_revision is NULL_REVISION:
196
196
            # explicit limit of no revisions needed
197
 
            return None
 
197
            return SearchResult(set(), set(), 0, set())
198
198
        if (self._last_revision is not None and
199
199
            self.to_repository.has_revision(self._last_revision)):
200
 
            return None
201
 
            
 
200
            return SearchResult(set(), set(), 0, set())
202
201
        try:
203
 
            # XXX: this gets the full graph on both sides, and will make sure
204
 
            # that ghosts are filled whether or not you care about them.
205
 
            return self.to_repository.missing_revision_ids(self.from_repository,
206
 
                self._last_revision, find_ghosts=self.find_ghosts)
 
202
            return self.to_repository.search_missing_revision_ids(
 
203
                self.from_repository, self._last_revision,
 
204
                find_ghosts=self.find_ghosts)
207
205
        except errors.NoSuchRevision:
208
206
            raise InstallFailed([self._last_revision])
209
207