~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-05 14:12:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6348.
  • Revision ID: jelmer@samba.org-20111205141223-8qxae4h37satlzgq
Move more functionality to vf_search.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    transport,
43
43
    treebuilder,
44
44
    versionedfile,
 
45
    vf_search,
45
46
    )
46
47
from bzrlib.branch import Branch
47
48
from bzrlib.bzrdir import (
3891
3892
        revs = [r for (r,ps) in graph.iter_ancestry([tip])
3892
3893
                if r != NULL_REVISION]
3893
3894
        revs.reverse()
3894
 
        search = _mod_graph.PendingAncestryResult([tip], stacked.repository)
 
3895
        search = vf_search.PendingAncestryResult([tip], stacked.repository)
3895
3896
        self.reset_smart_call_log()
3896
3897
        stream = source.get_stream(search)
3897
3898
        # We trust that if a revision is in the stream the rest of the new
4003
4004
        self.hpss_calls = []
4004
4005
        local.repository.fetch(
4005
4006
            remote_branch.repository,
4006
 
            fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
 
4007
            fetch_spec=vf_search.EverythingResult(remote_branch.repository))
4007
4008
        self.assertEqual(['Repository.get_stream_1.19'], self.hpss_calls)
4008
4009
 
4009
4010
    def override_verb(self, verb_name, verb):
4043
4044
        self.hpss_calls = []
4044
4045
        local.repository.fetch(
4045
4046
            remote_branch.repository,
4046
 
            fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
 
4047
            fetch_spec=vf_search.EverythingResult(remote_branch.repository))
4047
4048
        # make sure the overridden verb was used
4048
4049
        self.assertLength(1, verb_log)
4049
4050
        # more than one HPSS call is needed, but because it's a VFS callback