/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/test_smart.py

  • Committer: Martin Pool
  • Date: 2009-08-28 04:13:16 UTC
  • mfrom: (4634.6.8 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: mbp@sourcefrog.net-20090828041316-adcbxfnfpc4bjtpl
Merge 2.0 back to trunk

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('default')()
 
205
        reference_bzrdir_format = bzrdir.format_registry.get('pack-0.92')()
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'
250
254
        if (smart.bzrdir.SmartServerRequestFindRepositoryV3 ==
251
255
            self._request_class):
252
256
            return SuccessfulSmartServerResponse(
253
 
                ('ok', '', rich_root, subtrees, 'no',
 
257
                ('ok', '', rich_root, subtrees, external,
254
258
                 repo._format.network_name()))
255
259
        elif (smart.bzrdir.SmartServerRequestFindRepositoryV2 ==
256
260
            self._request_class):
257
261
            # All tests so far are on formats, and for non-external
258
262
            # repositories.
259
263
            return SuccessfulSmartServerResponse(
260
 
                ('ok', '', rich_root, subtrees, 'no'))
 
264
                ('ok', '', rich_root, subtrees, external))
261
265
        else:
262
266
            return SuccessfulSmartServerResponse(('ok', '', rich_root, subtrees))
263
267
 
452
456
    def test_stacked_branch(self):
453
457
        """Opening a stacked branch does not open the stacked-on branch."""
454
458
        trunk = self.make_branch('trunk')
455
 
        feature = self.make_branch('feature', format='1.9')
 
459
        feature = self.make_branch('feature')
456
460
        feature.set_stacked_on_url(trunk.base)
457
461
        opened_branches = []
458
462
        Branch.hooks.install_named_hook('open', opened_branches.append, None)
1242
1246
            SmartServerResponse(('history-incomplete', 2, r2)),
1243
1247
            request.execute('stacked', 1, (3, r3)))
1244
1248
 
 
1249
 
1245
1250
class TestSmartServerRepositoryGetStream(tests.TestCaseWithMemoryTransport):
1246
1251
 
1247
1252
    def make_two_commit_repo(self):