520
520
and this one merged in.
522
522
# assumes the target bzr dir format is compatible.
523
result = self._format.initialize(to_bzrdir)
523
result = to_bzrdir.create_workingtree()
524
524
self.copy_content_into(result, revision_id)
2714
2714
"""See WorkingTreeFormat.get_format_description()."""
2715
2715
return "Working tree format 2"
2717
def _stub_initialize_remote(self, branch):
2718
"""As a special workaround create critical control files for a remote working tree.
2717
def _stub_initialize_on_transport(self, transport, file_mode):
2718
"""Workaround: create control files for a remote working tree.
2720
2720
This ensures that it can later be updated and dealt with locally,
2721
since BzrDirFormat6 and BzrDirFormat5 cannot represent dirs with
2721
since BzrDirFormat6 and BzrDirFormat5 cannot represent dirs with
2722
2722
no working tree. (See bug #43064).
2724
2724
sio = StringIO()
2725
2725
inv = Inventory()
2726
2726
xml5.serializer_v5.write_inventory(inv, sio, working=True)
2728
branch._transport.put_file('inventory', sio,
2729
mode=branch.control_files._file_mode)
2730
branch._transport.put_bytes('pending-merges', '',
2731
mode=branch.control_files._file_mode)
2728
transport.put_file('inventory', sio, file_mode)
2729
transport.put_bytes('pending-merges', '', file_mode)
2734
2731
def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
2735
2732
accelerator_tree=None, hardlink=False):