~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-17 17:19:42 UTC
  • mto: This revision was merged to the branch mainline in revision 5903.
  • Revision ID: jelmer@samba.org-20110517171942-xruldxkfalnrpo2g
Add extra test for Repository.search_missing_revision_ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        elif self._last_revision == NULL_REVISION:
161
161
            # fetch_spec is None + last_revision is null => empty fetch.
162
162
            # explicit limit of no revisions needed
163
 
            return graph.EmptySearchResult()
 
163
            return _mod_graph.EmptySearchResult()
164
164
        elif self._last_revision is not None:
165
 
            return graph.NotInOtherForRevs(self.to_repository,
 
165
            return _mod_graph.NotInOtherForRevs(self.to_repository,
166
166
                self.from_repository, [self._last_revision],
167
167
                find_ghosts=self.find_ghosts).execute()
168
168
        else: # self._last_revision is None:
169
 
            return graph.EverythingNotInOther(self.to_repository,
 
169
            return _mod_graph.EverythingNotInOther(self.to_repository,
170
170
                self.from_repository,
171
171
                find_ghosts=self.find_ghosts).execute()
172
172
 
419
419
            if self.limit is not None:
420
420
                graph = self.source_repo.get_graph()
421
421
                topo_order = list(graph.iter_topo_order(ret.get_keys()))
422
 
                ret = topo_order[:self.limit]
423
 
            return self.source_repo.revision_ids_to_search_result(ret)
 
422
                result_set = topo_order[:self.limit]
 
423
                ret = self.source_repo.revision_ids_to_search_result(result_set)
 
424
            return ret
424
425
        else:
425
426
            return _mod_graph.NotInOtherForRevs(self.target_repo, self.source_repo,
426
427
                required_ids=heads_to_fetch, if_present_ids=if_present_fetch,