/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Vincent Ladeuil
  • Date: 2011-02-11 16:15:39 UTC
  • mto: This revision was merged to the branch mainline in revision 5661.
  • Revision ID: v.ladeuil+lp@free.fr-20110211161539-26o5a28ihyemvuzg
Fix pqm failure on python2.4.

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
68
69
    index as _mod_index,
69
70
    lru_cache,
70
71
    pack,
 
72
    patiencediff,
71
73
    progress,
72
74
    static_tuple,
73
75
    trace,
79
81
from bzrlib import (
80
82
    errors,
81
83
    osutils,
82
 
    patiencediff,
83
84
    )
84
85
from bzrlib.errors import (
85
86
    FileExists,
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:
3417
3418
            raise exc_class, exc_value, exc_traceback
3418
3419
 
3419
3420
 
3420
 
# Deprecated, use PatienceSequenceMatcher instead
3421
 
KnitSequenceMatcher = patiencediff.PatienceSequenceMatcher
3422
 
 
3423
 
 
3424
3421
def annotate_knit(knit, revision_id):
3425
3422
    """Annotate a knit with no cached annotations.
3426
3423