~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: John Arbash Meinel
  • Date: 2011-09-01 16:54:46 UTC
  • mto: This revision was merged to the branch mainline in revision 6133.
  • Revision ID: john@arbash-meinel.com-20110901165446-8q61mct72u4tdmu6
Add some tests for how the estimator works.

We have to be pretty 'loose' about the tests because zlib
is platform dependent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib import (
27
27
    bencode,
28
28
    commands,
29
 
    entropy,
30
29
    errors,
 
30
    estimate_compressed_size,
31
31
    graph,
32
32
    osutils,
33
33
    pack,
188
188
                               include_missing, max_size=65536):
189
189
        result = {}
190
190
        queried_revs = set()
191
 
        estimator = entropy.ZLibEstimator(max_size)
 
191
        estimator = estimate_compressed_size.ZLibEstimator(max_size)
192
192
        next_revs = revision_ids
193
193
        first_loop_done = False
194
194
        while next_revs: