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

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 16:40:42 UTC
  • mfrom: (6653.6.7 rename-controldir)
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170610164042-zrxqgy2htyduvke2
MergeĀ rename-controldirĀ branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        :param branch: A branch to override probing for the branch.
154
154
        """
155
155
        self._format = _format
156
 
        self.bzrdir = _bzrdir
 
156
        self.controldir = _bzrdir
157
157
        if not _internal:
158
158
            raise errors.BzrError("Please use bzrdir.open_workingtree or "
159
159
                "WorkingTree.open() to obtain a WorkingTree.")
162
162
        if branch is not None:
163
163
            self._branch = branch
164
164
        else:
165
 
            self._branch = self.bzrdir.open_branch()
 
165
            self._branch = self.controldir.open_branch()
166
166
        self.basedir = osutils.realpath(basedir)
167
167
        self._transport = _transport
168
168
        self._rules_searcher = None
170
170
 
171
171
    @property
172
172
    def user_transport(self):
173
 
        return self.bzrdir.user_transport
 
173
        return self.controldir.user_transport
174
174
 
175
175
    @property
176
176
    def control_transport(self):
186
186
        that bzr controls in this tree. I.E. a random .bzr directory placed
187
187
        on disk will not be a control file for this tree.
188
188
        """
189
 
        return self.bzrdir.is_control_filename(filename)
 
189
        return self.controldir.is_control_filename(filename)
190
190
 
191
191
    branch = property(
192
192
        fget=lambda self: self._branch,
641
641
    def _set_merges_from_parent_ids(self, parent_ids):
642
642
        merges = parent_ids[1:]
643
643
        self._transport.put_bytes('pending-merges', '\n'.join(merges),
644
 
            mode=self.bzrdir._get_file_mode())
 
644
            mode=self.controldir._get_file_mode())
645
645
 
646
646
    def _filter_parent_ids_by_ancestry(self, revision_ids):
647
647
        """Check that all merged revisions are proper 'heads'.
1214
1214
                    files_to_backup.append(path[1])
1215
1215
 
1216
1216
        def backup(file_to_backup):
1217
 
            backup_name = self.bzrdir._available_backup_name(file_to_backup)
 
1217
            backup_name = self.controldir._available_backup_name(file_to_backup)
1218
1218
            osutils.rename(abs_path, self.abspath(backup_name))
1219
1219
            return "removed %s (but kept a copy: %s)" % (file_to_backup,
1220
1220
                                                         backup_name)
1560
1560
                    bzrdir_loc = bisect_left(cur_disk_dir_content,
1561
1561
                        ('.bzr', '.bzr'))
1562
1562
                    if (bzrdir_loc < len(cur_disk_dir_content)
1563
 
                        and self.bzrdir.is_control_filename(
 
1563
                        and self.controldir.is_control_filename(
1564
1564
                            cur_disk_dir_content[bzrdir_loc][0])):
1565
1565
                        # we dont yield the contents of, or, .bzr itself.
1566
1566
                        del cur_disk_dir_content[bzrdir_loc]