~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

Untested code is broken code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
461
461
            # child may have shrunk, or might be the same.
462
462
            self._len = self._len - old_len + len(child)
463
463
            self._items[serialised_key] = child
 
464
            self._key = None
464
465
            return self.unique_serialised_prefix(), [("", self)]
465
466
        # child has overflown - create a new intermediate node.
466
467
        # XXX: This is where we might want to try and expand our depth
470
471
        for split, node in node_details:
471
472
            child.add_node(split, node)
472
473
        self._len = self._len - old_len + len(child)
 
474
        self._key = None
473
475
        return self.unique_serialised_prefix(), [("", self)]
474
476
 
475
477
    def _new_child(self, serialised_key, klass):
583
585
        if len(self._items) == 1:
584
586
            # this node is no longer needed:
585
587
            return self._items.values()[0]
 
588
        self._key = None
586
589
        return self
587
590
 
588
591