/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-16 19:47:19 UTC
  • mfrom: (7178 work)
  • mto: This revision was merged to the branch mainline in revision 7179.
  • Revision ID: jelmer@jelmer.uk-20181116194719-m5ut2wfuze5x9s1p
Merge trunk.

Show diffs side-by-side

added added

removed removed

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