~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

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
 
40
42
import heapq
41
43
import threading
42
44
 
920
922
        bytes = ''.join(lines)
921
923
        if len(bytes) != self._current_size():
922
924
            raise AssertionError('Invalid _current_size')
923
 
        _get_cache().add(self._key, bytes)
 
925
        _get_cache()[self._key] = bytes
924
926
        return [self._key]
925
927
 
926
928
    def refs(self):
1193
1195
                    prefix, node_key_filter = keys[record.key]
1194
1196
                    node_and_filters.append((node, node_key_filter))
1195
1197
                    self._items[prefix] = node
1196
 
                    _get_cache().add(record.key, bytes)
 
1198
                    _get_cache()[record.key] = bytes
1197
1199
                for info in node_and_filters:
1198
1200
                    yield info
1199
1201
 
1319
1321
            lines.append(serialised[prefix_len:])
1320
1322
        sha1, _, _ = store.add_lines((None,), (), lines)
1321
1323
        self._key = StaticTuple("sha1:" + sha1,).intern()
1322
 
        _get_cache().add(self._key, ''.join(lines))
 
1324
        _get_cache()[self._key] = ''.join(lines)
1323
1325
        yield self._key
1324
1326
 
1325
1327
    def _search_key(self, key):