/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: Robert Collins
  • Date: 2009-08-26 03:20:32 UTC
  • mfrom: (4637 +trunk)
  • mto: (4634.6.2 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: robertc@robertcollins.net-20090826032032-mx5kiog3eihaoy13
Merge and cherrypick outstanding 2.0 relevant patches from bzr.dev: Up to rev
4637, then 4639,4641,4643,4646,4649,4650,4651. (Robert Collins)

Log messages of the incorporated fixes:

revno: 4651 [merge]
  (robertc) Enable commit via record_iter_changes for specific file
        comments. (Robert Collins)

revno: 4650 [merge]
  Fix shelve on windows. (Robert Collins, #305006)

revno: 4649 [merge]
  (robertc) Make iter_changes produce output that is always safe to
        generate inventory deltas of in the same direction as the
        changes. (Robert Collins, #347649)

revno: 4646 [merge]
  (mbp) developer documentation about content filtering

revno: 4643 [merge]
  (mbp) small tweaks to release documentation

revno: 4641 [merge]
  (abentley) Shelve will not remove tree root.

revno: 4639 [merge]
  (andrew) Fix 'Revision ... not present' errors when upgrading stacked
        branches.

revno: 4637 [merge]
  Fix upgrade of branches in repositories.

revno: 4636 [merge]
  (mbp) fix crash formatting CannotBindAddress

revno: 4635 [merge]
  (robertc) Fix many locking errors on windows due to a small bug in
        merge.transform_tree. (Robert Collins)

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