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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """This module contains functions for using git.""" 6 """This module contains functions for using git."""
7 7
8 8
9 import os 9 import os
10 import shell_utils 10 import shell_utils
(...skipping 22 matching lines...) Expand all
33 # Get full hash since that is what was returned by rev-parse. 33 # Get full hash since that is what was returned by rev-parse.
34 return FullHash(commit) != last_non_merge 34 return FullHash(commit) != last_non_merge
35 35
36 def MergeAbort(): 36 def MergeAbort():
37 """Abort in process merge.""" 37 """Abort in process merge."""
38 shell_utils.run([GIT, 'merge', '--abort']) 38 shell_utils.run([GIT, 'merge', '--abort'])
39 39
40 def ShortHash(commit): 40 def ShortHash(commit):
41 """Return short hash of the specified commit.""" 41 """Return short hash of the specified commit."""
42 return shell_utils.run([GIT, 'show', commit, '--format=%h', '-s']).rstrip() 42 return shell_utils.run([GIT, 'show', commit, '--format=%h', '-s']).rstrip()
43
44 def GetRemoteMasterHash(git_url):
45 return shell_utils.run([GIT, 'ls-remote', git_url, '--verify',
46 'refs/heads/master'])
OLDNEW
« 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