Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: gerrit_util.py

Issue 2466953003: git-cl-land: print url of final commit location (Closed)
Patch Set: Avoid iterating over nonetype Created 4 years, 1 month 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 | git_cl.py » ('j') | 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 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.
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698