Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1293)

Unified Diff: my_activity.py

Issue 1086083007: In my_activity.py, multiple --last_week for more weeks (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: allow multiple weeks Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: my_activity.py
diff --git a/my_activity.py b/my_activity.py
index 35ec4d87f370f75881e859cef7e37f08dd2d31ff..593c187f43e3dc2cde1b97e732dc2971447100d8 100755
--- a/my_activity.py
+++ b/my_activity.py
@@ -723,8 +723,8 @@ def main():
'-w', '--week_of', metavar='<date>',
help='Show issues for week of the date')
parser.add_option(
- '-W', '--last_week', action='store_true',
- help='Show last week\'s issues')
+ '-W', '--last_week', action='count',
+ help='Show last week\'s issues. Use more times for more weeks.')
parser.add_option(
'-a', '--auth',
action='store_true',
@@ -808,7 +808,8 @@ def main():
elif options.week_of:
begin, end = (get_week_of(datetime.strptime(options.week_of, '%m/%d/%y')))
elif options.last_week:
- begin, end = (get_week_of(datetime.today() - timedelta(days=7)))
+ begin, end = (get_week_of(datetime.today() -
+ timedelta(days=1 + 7 * options.last_week)))
else:
begin, end = (get_week_of(datetime.today() - timedelta(days=1)))
else:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698