~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-30 22:04:45 UTC
  • mfrom: (4789.28.4 2.1.0b4-builder-no-keys)
  • Revision ID: pqm@pqm.ubuntu.com-20091130220445-vbfmmgocbgcs195q
(jam) Update BTreeBuilder to remove ._keys and use StaticTuple

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    knit,
32
32
    osutils,
33
33
    pack,
 
34
    static_tuple,
34
35
    trace,
35
36
    )
36
37
from bzrlib.btree_index import BTreeBuilder
1877
1878
        if not random_id:
1878
1879
            present_nodes = self._get_entries(keys)
1879
1880
            for (index, key, value, node_refs) in present_nodes:
1880
 
                if node_refs != keys[key][1]:
1881
 
                    details = '%s %s %s' % (key, (value, node_refs), keys[key])
 
1881
                # Sometimes these are passed as a list rather than a tuple
 
1882
                node_refs = static_tuple.as_tuples(node_refs)
 
1883
                passed = static_tuple.as_tuples(keys[key])
 
1884
                if node_refs != passed[1]:
 
1885
                    details = '%s %s %s' % (key, (value, node_refs), passed)
1882
1886
                    if self._inconsistency_fatal:
1883
1887
                        raise errors.KnitCorrupt(self, "inconsistent details"
1884
1888
                                                 " in add_records: %s" %