# HG changeset patch # User Emanuele Aina # Date 1172563536 -3600 # Node ID f9dc36b1bdd5020604c3331524b4b2a78a1cb89b # Parent 0c8a783dd197dd423954375fe5b2892743db900d Print relative names in the purge extension diff -r 0c8a783dd197 -r f9dc36b1bdd5 contrib/purge/purge.py --- 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): '''