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'] |