~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clean_tree.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-22 14:12:18 UTC
  • mfrom: (6155.3.1 jam)
  • Revision ID: pqm@pqm.ubuntu.com-20110922141218-86s4uu6nqvourw4f
(jameinel) Cleanup comments bzrlib/smart/__init__.py (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.osutils import isdir
28
28
from bzrlib.trace import note
29
29
from bzrlib.workingtree import WorkingTree
30
 
 
 
30
from bzrlib.i18n import gettext
31
31
 
32
32
def is_detritus(subp):
33
33
    """Return True if the supplied path is detritus, False otherwise"""
59
59
            ignored=ignored, detritus=detritus))
60
60
        deletables = _filter_out_nested_bzrdirs(deletables)
61
61
        if len(deletables) == 0:
62
 
            note('Nothing to delete.')
 
62
            note(gettext('Nothing to delete.'))
63
63
            return 0
64
64
        if not no_prompt:
65
65
            for path, subp in deletables:
105
105
        # Other errors are re-raised.
106
106
        if function is not os.remove or excinfo[1].errno != errno.EACCES:
107
107
            raise
108
 
        ui.ui_factory.show_warning('unable to remove %s' % path)
 
108
        ui.ui_factory.show_warning(gettext('unable to remove %s') % path)
109
109
    has_deleted = False
110
110
    for path, subp in deletables:
111
111
        if not has_deleted:
112
 
            note("deleting paths:")
 
112
            note(gettext("deleting paths:"))
113
113
            has_deleted = True
114
114
        if not dry_run:
115
115
            if isdir(path):
122
122
                    # We handle only permission error here
123
123
                    if e.errno != errno.EACCES:
124
124
                        raise e
125
 
                    ui.ui_factory.show_warning(
126
 
                        'unable to remove "%s": %s.' % (path, e.strerror))
 
125
                    ui.ui_factory.show_warning(gettext(
 
126
                        'unable to remove "{0}": {1}.').format(
 
127
                                                    path, e.strerror))
127
128
        else:
128
129
            note('  ' + subp)
129
130
    if not has_deleted:
130
 
        note("No files deleted.")
 
131
        note(gettext("No files deleted."))