/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: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

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