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: gerrit_util.py

Issue 1913913002: GetChangeDescriptionFromGitiles followup: future todo for no gitiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix Created 4 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: gerrit_util.py
diff --git a/gerrit_util.py b/gerrit_util.py
index 049c1c28926df10fa74fb8ed7a81ec5d78e82ebc..d9f23de5515e66dff5bbde33f19b8c1ffc7d552b 100755
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -491,6 +491,10 @@ def GetChangeDescriptionFromGitiles(url, revision):
"""
parsed = urlparse.urlparse(url)
path = '%s/+/%s?format=json' % (parsed.path, revision)
+ # Note: Gerrit instances that Chrome infrastructure uses thus far have all
+ # enabled Gitiles, which allowes us to execute this call. This isn't true for
+ # all Gerrit instances out there. Thus, if line below fails, consider adding a
+ # fallback onto actually fetching ref from remote using pure git.
return ReadHttpJsonResponse(CreateHttpConn(parsed.netloc, path))['message']
« 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