From c767e3f297058230bb75268842d70866b4d04c24 Mon Sep 17 00:00:00 2001 From: "tandrii@chromium.org" Date: Tue, 26 Apr 2016 14:28:49 +0000 Subject: [PATCH] GetChangeDescriptionFromGitiles followup: future todo for no gitiles. R=andybons@chromium.org BUG=603207, 605563 Review URL: https://codereview.chromium.org/1913913002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300194 0039d316-1c4b-4281-b951-d872f2087c98 --- gerrit_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gerrit_util.py b/gerrit_util.py index 9b3d61695..66b205f33 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']