~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/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:
38
38
    testament as _mod_testament,
39
39
    urlutils,
40
40
    vf_repository,
 
41
    vf_search,
41
42
    )
42
43
from bzrlib.branch import BranchReferenceFormat, BranchWriteLockResult
43
44
from bzrlib.decorators import needs_read_lock, needs_write_lock, only_raises
1841
1842
        included_keys = result_set.intersection(result_parents)
1842
1843
        start_keys = result_set.difference(included_keys)
1843
1844
        exclude_keys = result_parents.difference(result_set)
1844
 
        result = graph.SearchResult(start_keys, exclude_keys,
 
1845
        result = vf_search.SearchResult(start_keys, exclude_keys,
1845
1846
            len(result_set), result_set)
1846
1847
        return result
1847
1848
 
2066
2067
            parents_map = {}
2067
2068
        if _DEFAULT_SEARCH_DEPTH <= 0:
2068
2069
            (start_set, stop_keys,
2069
 
             key_count) = graph.search_result_from_parent_map(
 
2070
             key_count) = vf_search.search_result_from_parent_map(
2070
2071
                parents_map, self._unstacked_provider.missing_keys)
2071
2072
        else:
2072
2073
            (start_set, stop_keys,
2073
 
             key_count) = graph.limited_search_result_from_parent_map(
 
2074
             key_count) = vf_search.limited_search_result_from_parent_map(
2074
2075
                parents_map, self._unstacked_provider.missing_keys,
2075
2076
                keys, depth=_DEFAULT_SEARCH_DEPTH)
2076
2077
        recipe = ('manual', start_set, stop_keys, key_count)
2688
2689
            except errors.UnknownSmartMethod:
2689
2690
                medium._remember_remote_is_before(version)
2690
2691
            except errors.UnknownErrorFromSmartServer, e:
2691
 
                if isinstance(search, graph.EverythingResult):
 
2692
                if isinstance(search, vf_search.EverythingResult):
2692
2693
                    error_verb = e.error_from_smart_server.error_verb
2693
2694
                    if error_verb == 'BadSearch':
2694
2695
                        # Pre-2.4 servers don't support this sort of search.