~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-17 23:57:16 UTC
  • mfrom: (5091.1.2 dump-btree-cix-488607)
  • Revision ID: pqm@pqm.ubuntu.com-20100317235716-vws90s2mun3mn8lc
(andrew) Fix 'bzr dump-btree' to work with *.cix and *.six files. (#488607)

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
        for node in bt.iter_all_entries():
457
457
            # Node is made up of:
458
458
            # (index, key, value, [references])
459
 
            refs_as_tuples = static_tuple.as_tuples(node[3])
 
459
            try:
 
460
                refs = node[3]
 
461
            except IndexError:
 
462
                refs_as_tuples = None
 
463
            else:
 
464
                refs_as_tuples = static_tuple.as_tuples(refs)
460
465
            as_tuple = (tuple(node[1]), node[2], refs_as_tuples)
461
466
            self.outf.write('%s\n' % (as_tuple,))
462
467