/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/_chk_map_py.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-07 13:56:43 UTC
  • mfrom: (4241.6.9 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090407135643-r15qstzbwg87d2nq
(robertc) Add --development6-rich-root,
        disabling the legacy and unneeded development2 format,
        and activating the tests for CHK features disabled pending this format.
        (Robert Collins, John Arbash Meinel, Ian Clathworthy, Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009 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
19
19
import zlib
20
20
import struct
21
21
 
22
 
from bzrlib.static_tuple import StaticTuple
23
 
 
24
22
_LeafNode = None
25
23
_InternalNode = None
26
24
_unknown = None
95
93
        value_lines = lines[pos:pos+num_value_lines]
96
94
        pos += num_value_lines
97
95
        value = '\n'.join(value_lines)
98
 
        items[StaticTuple.from_sequence(elements[:-1])] = value
 
96
        items[tuple(elements[:-1])] = value
99
97
    if len(items) != length:
100
98
        raise AssertionError("item count (%d) mismatch for key %s,"
101
99
            " bytes %r" % (length, key, bytes))
143
141
    for line in lines[5:]:
144
142
        line = common_prefix + line
145
143
        prefix, flat_key = line.rsplit('\x00', 1)
146
 
        items[prefix] = StaticTuple(flat_key,)
 
144
        items[prefix] = (flat_key,)
147
145
    if len(items) == 0:
148
146
        raise AssertionError("We didn't find any item for %s" % key)
149
147
    result._items = items
157
155
    result._node_width = len(prefix)
158
156
    result._search_prefix = common_prefix
159
157
    return result
 
158