~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-17 00:32:27 UTC
  • mfrom: (4606.2.1 test-foreign)
  • Revision ID: pqm@pqm.ubuntu.com-20090817003227-g813yyjlq47j9qyb
(robertc) Prepare test_foreign for rich roots as the default format.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
        self.make_bzrdir('.')
203
203
        request_class = bzrlib.smart.bzrdir.SmartServerRequestCreateRepository
204
204
        request = request_class(backing)
205
 
        reference_bzrdir_format = bzrdir.format_registry.get('pack-0.92')()
 
205
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
206
206
        reference_format = reference_bzrdir_format.repository_format
207
207
        network_name = reference_format.network_name()
208
208
        expected = SuccessfulSmartServerResponse(
247
247
            subtrees = 'yes'
248
248
        else:
249
249
            subtrees = 'no'
250
 
        if repo._format.supports_external_lookups:
251
 
            external = 'yes'
252
 
        else:
253
 
            external = 'no'
254
250
        if (smart.bzrdir.SmartServerRequestFindRepositoryV3 ==
255
251
            self._request_class):
256
252
            return SuccessfulSmartServerResponse(
257
 
                ('ok', '', rich_root, subtrees, external,
 
253
                ('ok', '', rich_root, subtrees, 'no',
258
254
                 repo._format.network_name()))
259
255
        elif (smart.bzrdir.SmartServerRequestFindRepositoryV2 ==
260
256
            self._request_class):
261
257
            # All tests so far are on formats, and for non-external
262
258
            # repositories.
263
259
            return SuccessfulSmartServerResponse(
264
 
                ('ok', '', rich_root, subtrees, external))
 
260
                ('ok', '', rich_root, subtrees, 'no'))
265
261
        else:
266
262
            return SuccessfulSmartServerResponse(('ok', '', rich_root, subtrees))
267
263
 
456
452
    def test_stacked_branch(self):
457
453
        """Opening a stacked branch does not open the stacked-on branch."""
458
454
        trunk = self.make_branch('trunk')
459
 
        feature = self.make_branch('feature')
 
455
        feature = self.make_branch('feature', format='1.9')
460
456
        feature.set_stacked_on_url(trunk.base)
461
457
        opened_branches = []
462
458
        Branch.hooks.install_named_hook('open', opened_branches.append, None)