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

Unified Diff: slave/skia_slave_scripts/utils/git_utils.py

Issue 315083006: Add GetRemoteMasterHash() function to git_utils.py. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 6 years, 6 months 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 | « slave/skia_slave_scripts/utils/force_update_checkout.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/utils/git_utils.py
diff --git a/slave/skia_slave_scripts/utils/git_utils.py b/slave/skia_slave_scripts/utils/git_utils.py
index 0fa688daf3601481052e61eaeded752a7f6d2645..da7f0976ef2dc07852fd506a11d5bc9c9d6085c7 100644
--- a/slave/skia_slave_scripts/utils/git_utils.py
+++ b/slave/skia_slave_scripts/utils/git_utils.py
@@ -40,3 +40,7 @@ def MergeAbort():
def ShortHash(commit):
"""Return short hash of the specified commit."""
return shell_utils.run([GIT, 'show', commit, '--format=%h', '-s']).rstrip()
+
+def GetRemoteMasterHash(git_url):
+ return shell_utils.run([GIT, 'ls-remote', git_url, '--verify',
+ 'refs/heads/master'])
« no previous file with comments | « slave/skia_slave_scripts/utils/force_update_checkout.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698