Mercurial > kallithea
changeset 3395:4b84f435594b beta
fixed cleanup command
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 21 Feb 2013 02:39:37 +0100 |
parents | fe2bb88bf7ac |
children | 3faf7a7eebb3 |
files | rhodecode/lib/paster_commands/cleanup.py |
diffstat | 1 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/paster_commands/cleanup.py Thu Feb 21 02:31:21 2013 +0100 +++ b/rhodecode/lib/paster_commands/cleanup.py Thu Feb 21 02:39:37 2013 +0100 @@ -125,23 +125,26 @@ if remove: for path, date_ in to_remove: print >> sys.stdout, 'removing repository %s' % path - shutil.rmtree(path)) + shutil.rmtree(path) else: print 'nothing done exiting...' sys.exit(0) def update_parser(self): - self.parser.add_option('--older-than', - action='store', - dest='older_than', - help=( - "only remove repos that have been removed " - "at least given time ago " - "ex. --older-than=30d deletes repositores " - "removed more than 30days ago. Possible options " - "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL"), - ) - self.parser.add_option('--dont-ask', - action='store_true', - dest='dont_ask', - help=("Don't ask to remove repos")) + self.parser.add_option( + '--older-than', + action='store', + dest='older_than', + help=("only remove repos that have been removed " + "at least given time ago " + "ex. --older-than=30d deletes repositores " + "removed more than 30days ago. Possible options " + "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL") + ) + + self.parser.add_option( + '--dont-ask', + action="store_true", + dest="dont_ask", + help="Don't ask to remove repos" + )