~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2009-09-14 01:48:28 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4688.
  • Revision ID: mbp@sourcefrog.net-20090914014828-ydr9rlkdfq2sv57z
Merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    branch,
24
24
    builtins,
25
25
    bzrdir,
 
26
    check,
26
27
    debug,
27
28
    errors,
28
29
    push,
224
225
        # fulltext record for f-id @ rev-1, then this will fail.
225
226
        remote_branch = Branch.open(self.get_url('remote'))
226
227
        trunk.push(remote_branch)
227
 
        remote_branch.check()
 
228
        check.check_dwim(remote_branch.base, False, True, True)
228
229
 
229
230
    def test_no_get_parent_map_after_insert_stream(self):
230
231
        # Effort test for bug 331823
260
261
        self.assertFalse(local.is_locked())
261
262
        local.push(remote)
262
263
        hpss_call_names = [item.call.method for item in self.hpss_calls]
263
 
        self.assertTrue('Repository.insert_stream' in hpss_call_names)
264
 
        insert_stream_idx = hpss_call_names.index('Repository.insert_stream')
 
264
        self.assertTrue('Repository.insert_stream_1.19' in hpss_call_names)
 
265
        insert_stream_idx = hpss_call_names.index(
 
266
            'Repository.insert_stream_1.19')
265
267
        calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
266
268
        # After inserting the stream the client has no reason to query the
267
269
        # remote graph any further.
268
270
        self.assertEqual(
269
 
            ['Repository.insert_stream', 'Repository.insert_stream', 'get',
270
 
             'Branch.set_last_revision_info', 'Branch.unlock'],
 
271
            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
 
272
             'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
271
273
            calls_after_insert_stream)
272
274
 
273
275
    def disableOptimisticGetParentMap(self):
392
394
        # Create a smart server that publishes whatever the backing VFS server
393
395
        # does.
394
396
        self.smart_server = server.SmartTCPServer_for_testing()
395
 
        self.smart_server.setUp(self.get_server())
396
 
        self.addCleanup(self.smart_server.tearDown)
 
397
        self.start_server(self.smart_server, self.get_server())
397
398
        # Make two empty branches, 'empty' and 'target'.
398
399
        self.empty_branch = self.make_branch('empty')
399
400
        self.make_branch('target')