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

  • Committer: Jelmer Vernooij
  • Date: 2018-06-14 17:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 7065.
  • Revision ID: jelmer@jelmer.uk-20180614175916-a2e2xh5k533guq1x
Move breezy.plugins.git to breezy.git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
import errno
18
20
import os
19
21
import shutil
28
30
from .workingtree import WorkingTree
29
31
from .i18n import gettext
30
32
 
31
 
 
32
33
def is_detritus(subp):
33
34
    """Return True if the supplied path is detritus, False otherwise"""
34
35
    return subp.endswith('.THIS') or subp.endswith('.BASE') or\
55
56
    tree = WorkingTree.open_containing(directory)[0]
56
57
    with tree.lock_read():
57
58
        deletables = list(iter_deletables(tree, unknown=unknown,
58
 
                                          ignored=ignored, detritus=detritus))
 
59
            ignored=ignored, detritus=detritus))
59
60
        deletables = _filter_out_nested_controldirs(deletables)
60
61
        if len(deletables) == 0:
61
62
            note(gettext('Nothing to delete.'))
119
120
                        raise e
120
121
                    ui.ui_factory.show_warning(gettext(
121
122
                        'unable to remove "{0}": {1}.').format(
122
 
                        path, e.strerror))
 
123
                                                    path, e.strerror))
123
124
        else:
124
125
            note('  ' + subp)
125
126
    if not has_deleted: