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

Merge disable-medusa-for-python-2.6 into pyftpdlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
        self.disableOptimisticGetParentMap()
260
260
        self.assertFalse(local.is_locked())
261
261
        local.push(remote)
262
 
        hpss_call_names = [item[0].method for item in self.hpss_calls]
 
262
        hpss_call_names = [item.call.method for item in self.hpss_calls]
263
263
        self.assertTrue('Repository.insert_stream' in hpss_call_names)
264
264
        insert_stream_idx = hpss_call_names.index('Repository.insert_stream')
265
265
        calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
274
274
        # Tweak some class variables to stop remote get_parent_map calls asking
275
275
        # for or receiving more data than the caller asked for.
276
276
        old_flag = SmartServerRepositoryGetParentMap.no_extra_results
277
 
        inter_classes = [repository.InterOtherToRemote,
278
 
            repository.InterPackToRemotePack]
279
 
        old_batch_sizes = []
280
 
        for inter_class in inter_classes:
281
 
            old_batch_sizes.append(
282
 
                inter_class._walk_to_common_revisions_batch_size)
283
 
            inter_class._walk_to_common_revisions_batch_size = 1
 
277
        inter_class = repository.InterRepository
 
278
        old_batch_size = inter_class._walk_to_common_revisions_batch_size
 
279
        inter_class._walk_to_common_revisions_batch_size = 1
284
280
        SmartServerRepositoryGetParentMap.no_extra_results = True
285
281
        def reset_values():
286
282
            SmartServerRepositoryGetParentMap.no_extra_results = old_flag
287
 
            for inter_class, size in zip(inter_classes, old_batch_sizes):
288
 
                inter_class._walk_to_common_revisions_batch_size = size
 
283
            inter_class._walk_to_common_revisions_batch_size = old_batch_size
289
284
        self.addCleanup(reset_values)
290
285
 
291
286
 
418
413
        self.empty_branch.push(target)
419
414
        self.assertEqual(
420
415
            ['BzrDir.open',
421
 
             'BzrDir.open_branch',
 
416
             'BzrDir.open_branchV2',
422
417
             'BzrDir.find_repositoryV3',
423
418
             'Branch.get_stacked_on_url',
424
419
             'Branch.lock_write',