Index: gerrit_util.py |
diff --git a/gerrit_util.py b/gerrit_util.py |
index 7cab2a5c85e56fc9a93664ea0a8bb3b81f7cfab6..50b00e813a8846588c4358b4e759d51b4081a2d0 100755 |
--- a/gerrit_util.py |
+++ b/gerrit_util.py |
@@ -483,6 +483,12 @@ def GetChangeDetail(host, change, o_params=None): |
return ReadHttpJsonResponse(CreateHttpConn(host, path)) |
+def GetChangeCommit(host, change, revision='current'): |
+ """Query a gerrit server for a revision associated with a change.""" |
+ path = 'changes/%s/revisions/%s/commit?links' % (change, revision) |
+ return ReadHttpJsonResponse(CreateHttpConn(host, path)) |
+ |
+ |
def GetChangeDescriptionFromGitiles(url, revision): |
"""Query Gitiles for actual commit message for a given url and ref. |