~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Robert Collins
  • Date: 2008-02-05 22:07:57 UTC
  • mto: This revision was merged to the branch mainline in revision 3216.
  • Revision ID: robertc@robertcollins.net-20080205220757-p2j8klf0hwhzaim4
Change RemoteRepository.get_parent_map to use bz2 not gzip for compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# TODO: At some point, handle upgrades by just passing the whole request
18
18
# across to run on the server.
19
19
 
 
20
import bz2
20
21
from cStringIO import StringIO
21
22
 
22
23
from bzrlib import (
42
43
    )
43
44
from bzrlib.revision import NULL_REVISION
44
45
from bzrlib.trace import mutter, note
45
 
from bzrlib.tuned_gzip import GzipFile
46
46
 
47
47
# Note: RemoteBzrDirFormat is in bzrdir.py
48
48
 
854
854
            reponse[1].cancel_read_body()
855
855
            raise errors.UnexpectedSmartServerResponse(response[0])
856
856
        if response[0][0] == 'ok':
857
 
            coded = GzipFile(mode='rb',
858
 
                fileobj=StringIO(response[1].read_body_bytes())).read()
 
857
            coded = bz2.decompress(response[1].read_body_bytes())
859
858
            if coded == '':
860
859
                # no revisions found
861
860
                return {}