/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/tests/test_remote.py

  • Committer: Robert Collins
  • Date: 2008-01-14 04:46:08 UTC
  • mto: This revision was merged to the branch mainline in revision 3184.
  • Revision ID: robertc@robertcollins.net-20080114044608-bmse3mmsnp1663rf
Create new smart server verb Repository.get_parent_map.

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
        repo.lock_read()
579
579
        repo.unlock()
580
580
        parents = graph.get_parent_map([r1])
581
 
        self.assertEqual({r1: ()}, parents)
 
581
        self.assertEqual({r1: (NULL_REVISION,)}, parents)
582
582
        self.assertEqual(
583
 
            [('call_expecting_body', 'Repository.get_revision_graph',
584
 
             ('///quack/', ''))],
 
583
            [('call_expecting_body', 'Repository.get_parent_map',
 
584
             ('///quack/', r2))],
585
585
            client._calls)
586
586
        repo.unlock()
587
587
        # now we call again, and it should use the second response.
588
588
        repo.lock_read()
589
589
        graph = repo.get_graph()
590
 
        parents = graph.get_parent_map([r2])
591
 
        self.assertEqual({r2: (r1,)}, parents)
 
590
        parents = graph.get_parent_map([r1])
 
591
        self.assertEqual({r1: (NULL_REVISION,)}, parents)
592
592
        self.assertEqual(
593
 
            [('call_expecting_body', 'Repository.get_revision_graph',
594
 
              ('///quack/', '')),
595
 
             ('call_expecting_body', 'Repository.get_revision_graph',
596
 
              ('///quack/', ''))
 
593
            [('call_expecting_body', 'Repository.get_parent_map',
 
594
              ('///quack/', r2)),
 
595
             ('call_expecting_body', 'Repository.get_parent_map',
 
596
              ('///quack/', r1))
597
597
            ],
598
598
            client._calls)
599
599
        repo.unlock()