/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: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 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
58
57
import operator
59
58
import os
60
59
import sys
69
68
    index as _mod_index,
70
69
    lru_cache,
71
70
    pack,
72
 
    patiencediff,
73
71
    progress,
74
72
    static_tuple,
75
73
    trace,
81
79
from bzrlib import (
82
80
    errors,
83
81
    osutils,
 
82
    patiencediff,
84
83
    )
85
84
from bzrlib.errors import (
86
85
    FileExists,
1880
1879
        :return: the header and the decompressor stream.
1881
1880
                 as (stream, header_record)
1882
1881
        """
1883
 
        df = gzip.GzipFile(mode='rb', fileobj=StringIO(raw_data))
 
1882
        df = tuned_gzip.GzipFile(mode='rb', fileobj=StringIO(raw_data))
1884
1883
        try:
1885
1884
            # Current serialise
1886
1885
            rec = self._check_header(key, df.readline())
1895
1894
        # 4168 calls in 2880 217 internal
1896
1895
        # 4168 calls to _parse_record_header in 2121
1897
1896
        # 4168 calls to readlines in 330
1898
 
        df = gzip.GzipFile(mode='rb', fileobj=StringIO(data))
 
1897
        df = tuned_gzip.GzipFile(mode='rb', fileobj=StringIO(data))
1899
1898
        try:
1900
1899
            record_contents = df.readlines()
1901
1900
        except Exception, e:
3418
3417
            raise exc_class, exc_value, exc_traceback
3419
3418
 
3420
3419
 
 
3420
# Deprecated, use PatienceSequenceMatcher instead
 
3421
KnitSequenceMatcher = patiencediff.PatienceSequenceMatcher
 
3422
 
 
3423
 
3421
3424
def annotate_knit(knit, revision_id):
3422
3425
    """Annotate a knit with no cached annotations.
3423
3426