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

  • Committer: Jelmer Vernooij
  • Date: 2009-05-28 16:04:39 UTC
  • mfrom: (4387 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4405.
  • Revision ID: jelmer@samba.org-20090528160439-4z0xlrk5nejobm7q
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
431
431
    def iter_all_entries(self):
432
432
        """Iterate over all keys within the index
433
433
 
434
 
        :return: An iterable of (index, key, reference_lists, value). There is no
435
 
            defined order for the result iteration - it will be in the most
 
434
        :return: An iterable of (index, key, value, reference_lists). There is
 
435
            no defined order for the result iteration - it will be in the most
436
436
            efficient order for the index (in this case dictionary hash order).
437
437
        """
438
438
        if 'evil' in debug.debug_flags:
590
590
class _LeafNode(object):
591
591
    """A leaf node for a serialised B+Tree index."""
592
592
 
 
593
    __slots__ = ('keys',)
 
594
 
593
595
    def __init__(self, bytes, key_length, ref_list_length):
594
596
        """Parse bytes to create a leaf node object."""
595
597
        # splitlines mangles the \r delimiters.. don't use it.
600
602
class _InternalNode(object):
601
603
    """An internal node for a serialised B+Tree index."""
602
604
 
 
605
    __slots__ = ('keys', 'offset')
 
606
 
603
607
    def __init__(self, bytes):
604
608
        """Parse bytes to create an internal node object."""
605
609
        # splitlines mangles the \r delimiters.. don't use it.
611
615
        for line in lines[2:]:
612
616
            if line == '':
613
617
                break
614
 
            nodes.append(tuple(line.split('\0')))
 
618
            nodes.append(tuple(map(intern, line.split('\0'))))
615
619
        return nodes
616
620
 
617
621