Chromium Code Reviews| Index: gerrit_util.py |
| diff --git a/gerrit_util.py b/gerrit_util.py |
| index 53dc69c0c6d2806231e86f97e520faa7edb0e9ee..9a16a64d3c97cd9977799cbed55b56e76c220e2c 100755 |
| --- a/gerrit_util.py |
| +++ b/gerrit_util.py |
| @@ -483,6 +483,17 @@ def GetChangeDetail(host, change, o_params=None): |
| return ReadHttpJsonResponse(CreateHttpConn(host, path)) |
| +def GetChangeDescriptionFromGitiles(url, revision): |
| + """Query Gitiles for acutal commit message for a given url and ref. |
|
scottmg
2016/04/25 19:15:31
acutal -> actual
tandrii(chromium)
2016/04/25 19:20:00
Done.
|
| + |
| + url must be obtained from call to GetChangeDetail for a specific |
| + revision (patchset) under 'fetch' key. |
| + """ |
| + parsed = urlparse.urlparse(url) |
| + path = '%s/+/%s?format=json' % (parsed.path, revision) |
| + return ReadHttpJsonResponse(CreateHttpConn(parsed.netloc, path))['message'] |
| + |
| + |
| def GetChangeCurrentRevision(host, change): |
| """Get information about the latest revision for a given change.""" |
| return QueryChanges(host, {}, change, o_params=('CURRENT_REVISION',)) |