~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-05 15:16:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6348.
  • Revision ID: jelmer@samba.org-20111205151652-8y6qgvv1qkbv5f71
Fix get_state().

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                except StopIteration:
120
120
                    break
121
121
                search.stop_searching_any(exclude_keys.intersection(next_revs))
122
 
            search_result = search.get_result()
123
 
            if (not discard_excess and
124
 
                search_result.get_recipe()[3] != revision_count):
 
122
            (started_keys, excludes, included_keys) = search.get_state()
 
123
            if (not discard_excess and len(included_keys) != revision_count):
125
124
                # we got back a different amount of data than expected, this
126
125
                # gets reported as NoSuchRevision, because less revisions
127
126
                # indicates missing revisions, and more should never happen as
128
127
                # the excludes list considers ghosts and ensures that ghost
129
128
                # filling races are not a problem.
130
129
                return (None, FailedSmartServerResponse(('NoSuchRevision',)))
 
130
            search_result = vf_search.SearchResult(started_keys, excludes,
 
131
                len(included_keys), included_keys)
131
132
            return (search_result, None)
132
133
        finally:
133
134
            repository.unlock()