/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-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:
30
30
from .workingtree import WorkingTree
31
31
from .i18n import gettext
32
32
 
 
33
 
33
34
def is_detritus(subp):
34
35
    """Return True if the supplied path is detritus, False otherwise"""
35
36
    return subp.endswith('.THIS') or subp.endswith('.BASE') or\
56
57
    tree = WorkingTree.open_containing(directory)[0]
57
58
    with tree.lock_read():
58
59
        deletables = list(iter_deletables(tree, unknown=unknown,
59
 
            ignored=ignored, detritus=detritus))
 
60
                                          ignored=ignored, detritus=detritus))
60
61
        deletables = _filter_out_nested_controldirs(deletables)
61
62
        if len(deletables) == 0:
62
63
            note(gettext('Nothing to delete.'))
120
121
                        raise e
121
122
                    ui.ui_factory.show_warning(gettext(
122
123
                        'unable to remove "{0}": {1}.').format(
123
 
                                                    path, e.strerror))
 
124
                        path, e.strerror))
124
125
        else:
125
126
            note('  ' + subp)
126
127
    if not has_deleted: