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

Unified Diff: git_cl.py

Issue 418293004: Do not fetch the CL description when using git cl status --fast. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 5 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: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index a2bc0ffbe5a867f7f83d5e0ee9412a5d69bf9509..3b7ab2934eb3fa21c31672a82b6ea99b0366a2a0 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -698,7 +698,7 @@ or verify this branch is set up to track another (via the --track argument to
issue = self.GetIssue()
try:
self.description = self.RpcServer().get_description(issue).strip()
- except urllib2.HTTPError, e:
+ except urllib2.HTTPError as e:
if e.code == 404:
DieWithError(
('\nWhile fetching the description for issue %d, received a '
@@ -712,6 +712,12 @@ or verify this branch is set up to track another (via the --track argument to
else:
DieWithError(
'\nFailed to fetch issue description. HTTP error %d' % e.code)
+ except urllib2.URLError as e:
+ print >> sys.stderr, (
+ 'Warning: Failed to retrieve CL description due to network '
+ 'failure.')
+ self.description = ''
+
self.has_description = True
if pretty:
wrapper = textwrap.TextWrapper()
@@ -1316,8 +1322,9 @@ def CMDstatus(parser, args):
return 0
print cl.GetBranch()
print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL())
- print 'Issue description:'
- print cl.GetDescription(pretty=True)
+ if not options.fast:
+ print 'Issue description:'
iannucci 2014/07/27 18:05:09 it would be neat to cache this non-fast stuff. It
M-A Ruel 2014/07/28 15:35:41 The funny thing is that gcl does that. It should b
+ print cl.GetDescription(pretty=True)
return 0
« 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