~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_index.py

  • Committer: Robert Collins
  • Date: 2007-08-08 04:45:55 UTC
  • mto: (2592.3.96 repository)
  • mto: This revision was merged to the branch mainline in revision 2742.
  • Revision ID: robertc@robertcollins.net-20070808044555-10k443n441f093dx
Review feedback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
354
354
 
355
355
    def make_index(self, ref_lists=0, key_elements=1, nodes=[]):
356
356
        builder = GraphIndexBuilder(ref_lists, key_elements=key_elements)
357
 
        for node, value, references in nodes:
358
 
            builder.add_node(node, value, references)
 
357
        for key, value, references in nodes:
 
358
            builder.add_node(key, value, references)
359
359
        stream = builder.finish()
360
360
        trans = self.get_transport()
361
361
        trans.put_file('index', stream)
535
535
 
536
536
    def make_index(self, name, ref_lists=0, key_elements=1, nodes=[]):
537
537
        builder = GraphIndexBuilder(ref_lists, key_elements=key_elements)
538
 
        for node, value, references in nodes:
539
 
            builder.add_node(node, value, references)
 
538
        for key, value, references in nodes:
 
539
            builder.add_node(key, value, references)
540
540
        stream = builder.finish()
541
541
        trans = self.get_transport()
542
542
        trans.put_file(name, stream)
822
822
        result = InMemoryGraphIndex(ref_lists, key_elements=key_elements)
823
823
        result.add_nodes(nodes)
824
824
        if add_callback:
825
 
            add_nodes_callback=result.add_nodes
 
825
            add_nodes_callback = result.add_nodes
826
826
        else:
827
 
            add_nodes_callback=None
 
827
            add_nodes_callback = None
828
828
        adapter = GraphIndexPrefixAdapter(result, ('prefix', ), key_elements - 1,
829
829
            add_nodes_callback=add_nodes_callback)
830
830
        return result, adapter