Mercurial > hg
changeset 4120:f9dc36b1bdd5
Print relative names in the purge extension
author | Emanuele Aina <em@nerd.ocracy.org> |
---|---|
date | Tue, 27 Feb 2007 09:05:36 +0100 |
parents | 0c8a783dd197 |
children | d250076824e3 |
files | contrib/purge/purge.py |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/purge/purge.py Tue Feb 27 16:48:17 2007 -0600 +++ b/contrib/purge/purge.py Tue Feb 27 09:05:36 2007 +0100 @@ -70,24 +70,25 @@ # directory. if self._repo.dirstate.state(relative_name) != '?': return - self._ui.note(_('Removing file %s\n') % name) + self._ui.note(_('Removing file %s\n') % relative_name) if self._act: try: os.remove(name) except OSError, e: - self._error(_('%s cannot be removed') % name) + self._error(_('%s cannot be removed') % relative_name) else: - self._ui.write('%s%s' % (name, self._eol)) + self._ui.write('%s%s' % (relative_name, self._eol)) def _remove_dir(self, name): - self._ui.note(_('Removing directory %s\n') % name) + relative_name = self._relative_name(name) + self._ui.note(_('Removing directory %s\n') % relative_name) if self._act: try: os.rmdir(name) except OSError, e: - self._error(_('%s cannot be removed') % name) + self._error(_('%s cannot be removed') % relative_name) else: - self._ui.write('%s%s' % (name, self._eol)) + self._ui.write('%s%s' % (relative_name, self._eol)) def _relative_name(self, path): '''