~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-08-17 18:13:57 UTC
  • mfrom: (5268.7.29 transport-segments)
  • Revision ID: pqm@pqm.ubuntu.com-20110817181357-y5q5eth1hk8bl3om
(jelmer) Allow specifying the colocated branch to use in the branch URL,
 and retrieving the branch name using ControlDir._get_selected_branch.
 (Jelmer Vernooij)

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