~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-02 15:28:44 UTC
  • mfrom: (3650.5.9 push)
  • Revision ID: pqm@pqm.ubuntu.com-20080902152844-dext0kmx4m0u5szy
Clean up push, allowing default stacking policies (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
520
520
            and this one merged in.
521
521
        """
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)
525
525
        return result
526
526
 
2714
2714
        """See WorkingTreeFormat.get_format_description()."""
2715
2715
        return "Working tree format 2"
2716
2716
 
2717
 
    def _stub_initialize_remote(self, branch):
2718
 
        """As a special workaround create critical control files for a remote working tree.
2719
 
        
 
2717
    def _stub_initialize_on_transport(self, transport, file_mode):
 
2718
        """Workaround: create control files for a remote working tree.
 
2719
 
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).
2723
2723
        """
2724
2724
        sio = StringIO()
2725
2725
        inv = Inventory()
2726
2726
        xml5.serializer_v5.write_inventory(inv, sio, working=True)
2727
2727
        sio.seek(0)
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)
2732
 
        
 
2728
        transport.put_file('inventory', sio, file_mode)
 
2729
        transport.put_bytes('pending-merges', '', file_mode)
2733
2730
 
2734
2731
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
2735
2732
                   accelerator_tree=None, hardlink=False):