490
490
self._next_open_branch_result = None
491
491
return _mod_bzrdir.BzrDir.break_lock(self)
493
def _vfs_checkout_metadir(self):
495
return self._real_bzrdir.checkout_metadir()
497
def checkout_metadir(self):
498
"""Retrieve the controldir format to use for checkouts of this one.
500
medium = self._client._medium
501
if medium._is_remote_before((2, 5)):
502
return self._vfs_checkout_metadir()
503
path = self._path_for_remote_call(self._client)
505
response = self._client.call('BzrDir.checkout_metadir',
507
except errors.UnknownSmartMethod:
508
medium._remember_remote_is_before((2, 5))
509
return self._vfs_checkout_metadir()
510
if len(response) != 3:
511
raise errors.UnexpectedSmartServerResponse(response)
512
control_name, repo_name, branch_name = response
514
format = controldir.network_format_registry.get(control_name)
516
raise errors.UnknownFormatError(kind='control',
520
repo_format = _mod_repository.network_format_registry.get(
523
raise errors.UnknownFormatError(kind='repository',
525
format.repository_format = repo_format
528
format.set_branch_format(
529
branch.network_format_registry.get(branch_name))
531
raise errors.UnknownFormatError(kind='branch',
493
535
def _vfs_cloning_metadir(self, require_stacking=False):
494
536
self._ensure_real()
495
537
return self._real_bzrdir.cloning_metadir(
3179
3221
self.bzrdir, self._client)
3180
3222
return self._control_files
3182
def _get_checkout_format(self, lightweight=False):
3185
format = RemoteBzrDirFormat()
3186
self.bzrdir._format._supply_sub_formats_to(format)
3187
format.workingtree_format = self._real_branch._get_checkout_format(
3188
lightweight=lightweight).workingtree_format
3191
return self._real_branch._get_checkout_format(lightweight=False)
3193
3224
def get_physical_lock_status(self):
3194
3225
"""See Branch.get_physical_lock_status()."""