/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 breezy/plugins/weave_fmt/workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:17:06 UTC
  • mto: (6670.4.8 move-bzr)
  • mto: This revision was merged to the branch mainline in revision 6681.
  • Revision ID: jelmer@jelmer.uk-20170610001706-xn6jiuev350246mr
Rename a number of attributes from bzrdir to controldir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        transport.put_file('inventory', sio, file_mode)
82
82
        transport.put_bytes('pending-merges', '', file_mode)
83
83
 
84
 
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
 
84
    def initialize(self, a_controldir, revision_id=None, from_branch=None,
85
85
                   accelerator_tree=None, hardlink=False):
86
86
        """See WorkingTreeFormat.initialize()."""
87
 
        if not isinstance(a_bzrdir.transport, LocalTransport):
88
 
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
 
87
        if not isinstance(a_controldir.transport, LocalTransport):
 
88
            raise errors.NotLocalUrl(a_controldir.transport.base)
89
89
        if from_branch is not None:
90
90
            branch = from_branch
91
91
        else:
92
 
            branch = a_bzrdir.open_branch()
 
92
            branch = a_controldir.open_branch()
93
93
        if revision_id is None:
94
94
            revision_id = _mod_revision.ensure_null(branch.last_revision())
95
95
        branch.lock_write()
98
98
        finally:
99
99
            branch.unlock()
100
100
        inv = inventory.Inventory()
101
 
        wt = WorkingTree2(a_bzrdir.root_transport.local_abspath('.'),
 
101
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
102
102
                         branch,
103
103
                         inv,
104
104
                         _internal=True,
105
105
                         _format=self,
106
 
                         _bzrdir=a_bzrdir,
 
106
                         _bzrdir=a_controldir,
107
107
                         _control_files=branch.control_files)
108
108
        basis_tree = branch.repository.revision_tree(revision_id)
109
109
        if basis_tree.get_root_id() is not None:
124
124
        from breezy.plugins.weave_fmt.bzrdir import BzrDirFormat6
125
125
        self._matchingbzrdir = BzrDirFormat6()
126
126
 
127
 
    def open(self, a_bzrdir, _found=False):
128
 
        """Return the WorkingTree object for a_bzrdir
 
127
    def open(self, a_controldir, _found=False):
 
128
        """Return the WorkingTree object for a_controldir
129
129
 
130
130
        _found is a private parameter, do not use it. It is used to indicate
131
131
               if format probing has already been done.
133
133
        if not _found:
134
134
            # we are being called directly and must probe.
135
135
            raise NotImplementedError
136
 
        if not isinstance(a_bzrdir.transport, LocalTransport):
137
 
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
138
 
        wt = WorkingTree2(a_bzrdir.root_transport.local_abspath('.'),
 
136
        if not isinstance(a_controldir.transport, LocalTransport):
 
137
            raise errors.NotLocalUrl(a_controldir.transport.base)
 
138
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
139
139
                           _internal=True,
140
140
                           _format=self,
141
 
                           _bzrdir=a_bzrdir,
142
 
                           _control_files=a_bzrdir.open_branch().control_files)
 
141
                           _bzrdir=a_controldir,
 
142
                           _control_files=a_controldir.open_branch().control_files)
143
143
        return wt
144
144
 
145
145