/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/per_branch/test_push.py

  • Committer: Martin Pool
  • Date: 2010-02-09 19:04:02 UTC
  • mfrom: (5010 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5019.
  • Revision ID: mbp@canonical.com-20100209190402-2xbzrchmb4dfi2j7
Resolve conflicts with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
    def disableOptimisticGetParentMap(self):
276
276
        # Tweak some class variables to stop remote get_parent_map calls asking
277
277
        # for or receiving more data than the caller asked for.
278
 
        old_flag = SmartServerRepositoryGetParentMap.no_extra_results
279
 
        inter_class = repository.InterRepository
280
 
        old_batch_size = inter_class._walk_to_common_revisions_batch_size
281
 
        inter_class._walk_to_common_revisions_batch_size = 1
282
 
        SmartServerRepositoryGetParentMap.no_extra_results = True
283
 
        def reset_values():
284
 
            SmartServerRepositoryGetParentMap.no_extra_results = old_flag
285
 
            inter_class._walk_to_common_revisions_batch_size = old_batch_size
286
 
        self.addCleanup(reset_values)
 
278
        self.overrideAttr(repository.InterRepository,
 
279
                          '_walk_to_common_revisions_batch_size', 1)
 
280
        self.overrideAttr(SmartServerRepositoryGetParentMap,
 
281
                          'no_extra_results', True)
287
282
 
288
283
 
289
284
class TestPushHook(TestCaseWithBranch):
414
409
        self.empty_branch.push(target)
415
410
        self.assertEqual(
416
411
            ['BzrDir.open_2.1',
417
 
             'BzrDir.open_branchV2',
 
412
             'BzrDir.open_branchV3',
418
413
             'BzrDir.find_repositoryV3',
419
414
             'Branch.get_stacked_on_url',
420
415
             'Branch.lock_write',