~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-12 00:08:41 UTC
  • mfrom: (5590.1.6 2.3-gzip-py2.7)
  • Revision ID: pqm@pqm.ubuntu.com-20110112000841-bsgwos6fnhv9nlc7
(jameinel) Stop using bzrlib.tuned_gzip.GzipFile. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
54
54
 
55
55
from cStringIO import StringIO
56
56
from itertools import izip
 
57
import gzip
57
58
import operator
58
59
import os
59
60
import sys
1879
1880
        :return: the header and the decompressor stream.
1880
1881
                 as (stream, header_record)
1881
1882
        """
1882
 
        df = tuned_gzip.GzipFile(mode='rb', fileobj=StringIO(raw_data))
 
1883
        df = gzip.GzipFile(mode='rb', fileobj=StringIO(raw_data))
1883
1884
        try:
1884
1885
            # Current serialise
1885
1886
            rec = self._check_header(key, df.readline())
1894
1895
        # 4168 calls in 2880 217 internal
1895
1896
        # 4168 calls to _parse_record_header in 2121
1896
1897
        # 4168 calls to readlines in 330
1897
 
        df = tuned_gzip.GzipFile(mode='rb', fileobj=StringIO(data))
 
1898
        df = gzip.GzipFile(mode='rb', fileobj=StringIO(data))
1898
1899
        try:
1899
1900
            record_contents = df.readlines()
1900
1901
        except Exception, e: