~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: Martin Packman
  • Date: 2011-11-29 16:14:12 UTC
  • mto: This revision was merged to the branch mainline in revision 6327.
  • Revision ID: martin.packman@canonical.com-20111129161412-mx4yu5mg6xsaty46
Require the dulwich package when using py2exe with the git plugin enabled

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    bencode,
29
29
    errors,
30
30
    estimate_compressed_size,
 
31
    graph,
31
32
    osutils,
32
33
    pack,
33
34
    trace,
34
35
    ui,
35
 
    vf_search,
36
36
    )
37
37
from bzrlib.bzrdir import BzrDir
38
38
from bzrlib.smart.request import (
85
85
            they expected and get it from elsewhere.
86
86
        """
87
87
        if search_bytes == 'everything':
88
 
            return vf_search.EverythingResult(repository), None
 
88
            return graph.EverythingResult(repository), None
89
89
        lines = search_bytes.split('\n')
90
90
        if lines[0] == 'ancestry-of':
91
91
            heads = lines[1:]
92
 
            search_result = vf_search.PendingAncestryResult(heads, repository)
 
92
            search_result = graph.PendingAncestryResult(heads, repository)
93
93
            return search_result, None
94
94
        elif lines[0] == 'search':
95
95
            return self.recreate_search_from_recipe(repository, lines[1:],
119
119
                except StopIteration:
120
120
                    break
121
121
                search.stop_searching_any(exclude_keys.intersection(next_revs))
122
 
            (started_keys, excludes, included_keys) = search.get_state()
123
 
            if (not discard_excess and len(included_keys) != revision_count):
 
122
            search_result = search.get_result()
 
123
            if (not discard_excess and
 
124
                search_result.get_recipe()[3] != revision_count):
124
125
                # we got back a different amount of data than expected, this
125
126
                # gets reported as NoSuchRevision, because less revisions
126
127
                # indicates missing revisions, and more should never happen as
127
128
                # the excludes list considers ghosts and ensures that ghost
128
129
                # filling races are not a problem.
129
130
                return (None, FailedSmartServerResponse(('NoSuchRevision',)))
130
 
            search_result = vf_search.SearchResult(started_keys, excludes,
131
 
                len(included_keys), included_keys)
132
131
            return (search_result, None)
133
132
        finally:
134
133
            repository.unlock()