Show More
@@ -109,7 +109,7 b' class Command(BasePasterCommand):' | |||||
109 | to_remove_filtered.append([name, date_]) |
|
109 | to_remove_filtered.append([name, date_]) | |
110 |
|
110 | |||
111 | to_remove = to_remove_filtered |
|
111 | to_remove = to_remove_filtered | |
112 |
print >> sys.stdout, 'removing |
|
112 | print >> sys.stdout, 'removing %s deleted repos older than %s (%s)' \ | |
113 | % (len(to_remove), older_than, older_than_date) |
|
113 | % (len(to_remove), older_than, older_than_date) | |
114 | else: |
|
114 | else: | |
115 | print >> sys.stdout, 'removing all [%s] deleted repos' \ |
|
115 | print >> sys.stdout, 'removing all [%s] deleted repos' \ | |
@@ -118,7 +118,8 b' class Command(BasePasterCommand):' | |||||
118 | # don't ask just remove ! |
|
118 | # don't ask just remove ! | |
119 | remove = True |
|
119 | remove = True | |
120 | else: |
|
120 | else: | |
121 | remove = ask_ok('are you sure to remove listed repos \n%s [y/n]?' |
|
121 | remove = ask_ok('the following repositories will be deleted completely:\n%s\n' | |
|
122 | 'are you sure you want to remove them [y/n]?' | |||
122 | % ', \n'.join(['%s removed on %s' |
|
123 | % ', \n'.join(['%s removed on %s' | |
123 | % (safe_str(x[0]), safe_str(x[1])) for x in to_remove])) |
|
124 | % (safe_str(x[0]), safe_str(x[1])) for x in to_remove])) | |
124 |
|
125 | |||
@@ -136,15 +137,17 b' class Command(BasePasterCommand):' | |||||
136 | action='store', |
|
137 | action='store', | |
137 | dest='older_than', |
|
138 | dest='older_than', | |
138 | help=("only remove repos that have been removed " |
|
139 | help=("only remove repos that have been removed " | |
139 | "at least given time ago " |
|
140 | "at least given time ago. " | |
140 |
" |
|
141 | "The default is to remove all removed repositories. " | |
141 | "removed more than 30days ago. Possible options " |
|
142 | "Possible suffixes: " | |
142 |
"d |
|
143 | "d (days), h (hours), m (minutes), s (seconds). " | |
|
144 | "For example --older-than=30d deletes repositories " | |||
|
145 | "removed more than 30 days ago.") | |||
143 | ) |
|
146 | ) | |
144 |
|
147 | |||
145 | self.parser.add_option( |
|
148 | self.parser.add_option( | |
146 | '--dont-ask', |
|
149 | '--dont-ask', | |
147 | action="store_true", |
|
150 | action="store_true", | |
148 | dest="dont_ask", |
|
151 | dest="dont_ask", | |
149 | help="Don't ask to remove repos" |
|
152 | help="remove repositories without asking for confirmation." | |
150 | ) |
|
153 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now