/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: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
            branch.unlock()
105
105
        inv = inventory.Inventory()
106
106
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
107
 
                         branch,
108
 
                         inv,
109
 
                         _internal=True,
110
 
                         _format=self,
111
 
                         _controldir=a_controldir,
112
 
                         _control_files=branch.control_files)
 
107
                          branch,
 
108
                          inv,
 
109
                          _internal=True,
 
110
                          _format=self,
 
111
                          _controldir=a_controldir,
 
112
                          _control_files=branch.control_files)
113
113
        basis_tree = branch.repository.revision_tree(revision_id)
114
114
        if basis_tree.get_root_id() is not None:
115
115
            wt.set_root_id(basis_tree.get_root_id())
141
141
        if not isinstance(a_controldir.transport, LocalTransport):
142
142
            raise errors.NotLocalUrl(a_controldir.transport.base)
143
143
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
144
 
                           _internal=True,
145
 
                           _format=self,
146
 
                           _controldir=a_controldir,
147
 
                           _control_files=a_controldir.open_branch().control_files)
 
144
                          _internal=True,
 
145
                          _format=self,
 
146
                          _controldir=a_controldir,
 
147
                          _control_files=a_controldir.open_branch().control_files)
148
148
        return wt
149
149
 
150
150
 
171
171
        """Return the references needed to perform a check of this tree."""
172
172
        return [('trees', self.last_revision())]
173
173
 
174
 
 
175
174
    def lock_tree_write(self):
176
175
        """See WorkingTree.lock_tree_write().
177
176
 
229
228
                if text is True:
230
229
                    for suffix in ('.THIS', '.OTHER'):
231
230
                        try:
232
 
                            kind = osutils.file_kind(self.abspath(conflicted+suffix))
 
231
                            kind = osutils.file_kind(
 
232
                                self.abspath(conflicted + suffix))
233
233
                            if kind != "file":
234
234
                                text = False
235
235
                        except errors.NoSuchFile:
236
236
                            text = False
237
237
                        if text == False:
238
238
                            break
239
 
                ctype = {True: 'text conflict', False: 'contents conflict'}[text]
 
239
                ctype = {True: 'text conflict',
 
240
                         False: 'contents conflict'}[text]
240
241
                conflicts.append(_mod_conflicts.Conflict.factory(ctype,
241
 
                                 path=conflicted,
242
 
                                 file_id=self.path2id(conflicted)))
 
242
                                                                 path=conflicted,
 
243
                                                                 file_id=self.path2id(conflicted)))
243
244
            return conflicts
244
245
 
245
246
    def set_conflicts(self, arg):