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

Unified Diff: my_activity.py

Issue 230823003: Add --last_week/-W option to my_activity.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 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 48aeaea7b48b71a5277f9a138743779b9b918956..a64f3c82df234b8f7b6e9f4be11518043cd58d32 100755
--- a/my_activity.py
+++ b/my_activity.py
@@ -702,7 +702,7 @@ def main():
relativedelta(months=2))
parser.add_option(
'-Q', '--last_quarter', action='store_true',
- help='Use last quarter\'s dates, e.g. %s to %s' % (
+ help='Use last quarter\'s dates, i.e. %s to %s' % (
szager1 2014/04/09 17:05:50 Thank you, that is a pet peeve of mine.
quarter_begin.strftime('%Y-%m-%d'), quarter_end.strftime('%Y-%m-%d')))
parser.add_option(
'-Y', '--this_year', action='store_true',
@@ -711,6 +711,9 @@ 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')
+ parser.add_option(
'-a', '--auth',
action='store_true',
help='Ask to authenticate for instances with no auth cookie')
@@ -791,6 +794,8 @@ def main():
begin, end = get_year_of(datetime.today())
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)))
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