~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_interbranch/test_push.py

Merge cleanup into description

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        builder.build_snapshot('third', ['second'], [])
256
256
        builder.build_snapshot('fourth', ['third'], [])
257
257
        builder.finish_series()
258
 
        local = builder.get_branch()
259
258
        local = branch.Branch.open(self.get_vfs_only_url('local'))
260
259
        # Initial push of three revisions
261
260
        remote_bzrdir = local.bzrdir.sprout(
281
280
    def disableOptimisticGetParentMap(self):
282
281
        # Tweak some class variables to stop remote get_parent_map calls asking
283
282
        # for or receiving more data than the caller asked for.
284
 
        old_flag = SmartServerRepositoryGetParentMap.no_extra_results
285
 
        inter_class = repository.InterRepository
286
 
        old_batch_size = inter_class._walk_to_common_revisions_batch_size
287
 
        inter_class._walk_to_common_revisions_batch_size = 1
288
 
        SmartServerRepositoryGetParentMap.no_extra_results = True
289
 
        def reset_values():
290
 
            SmartServerRepositoryGetParentMap.no_extra_results = old_flag
291
 
            inter_class._walk_to_common_revisions_batch_size = old_batch_size
292
 
        self.addCleanup(reset_values)
 
283
        self.overrideAttr(repository.InterRepository,
 
284
                          '_walk_to_common_revisions_batch_size', 1)
 
285
        self.overrideAttr(SmartServerRepositoryGetParentMap,
 
286
                            'no_extra_results', True)
293
287
 
294
288
 
295
289
class TestPushHook(TestCaseWithInterBranch):