~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-11 15:04:23 UTC
  • mfrom: (5848.1.1 2.4-cython-first)
  • Revision ID: pqm@pqm.ubuntu.com-20110511150423-tpm1ablukqalkvim
(jameinel) Default to using Cython for compiling code,
 rather than Pyrex. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
"""
39
39
 
40
 
from __future__ import absolute_import
41
 
 
42
40
import heapq
43
41
import threading
44
42
 
49
47
    )
50
48
""")
51
49
from bzrlib import (
52
 
    errors,
53
50
    lru_cache,
54
51
    osutils,
55
52
    registry,
922
919
        bytes = ''.join(lines)
923
920
        if len(bytes) != self._current_size():
924
921
            raise AssertionError('Invalid _current_size')
925
 
        _get_cache()[self._key] = bytes
 
922
        _get_cache().add(self._key, bytes)
926
923
        return [self._key]
927
924
 
928
925
    def refs(self):
1195
1192
                    prefix, node_key_filter = keys[record.key]
1196
1193
                    node_and_filters.append((node, node_key_filter))
1197
1194
                    self._items[prefix] = node
1198
 
                    _get_cache()[record.key] = bytes
 
1195
                    _get_cache().add(record.key, bytes)
1199
1196
                for info in node_and_filters:
1200
1197
                    yield info
1201
1198
 
1321
1318
            lines.append(serialised[prefix_len:])
1322
1319
        sha1, _, _ = store.add_lines((None,), (), lines)
1323
1320
        self._key = StaticTuple("sha1:" + sha1,).intern()
1324
 
        _get_cache()[self._key] = ''.join(lines)
 
1321
        _get_cache().add(self._key, ''.join(lines))
1325
1322
        yield self._key
1326
1323
 
1327
1324
    def _search_key(self, key):