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

Side by Side Diff: tools/auto_bisect/source_control.py

Issue 925703002: Fix a couple minor typos in auto_bisect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « tools/auto_bisect/fetch_build.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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """This module contains functions for performing source control operations.""" 5 """This module contains functions for performing source control operations."""
6 6
7 import bisect_utils 7 import bisect_utils
8 8
9 9
10 def IsInGitRepository(): 10 def IsInGitRepository():
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 def IsInProperBranch(): 119 def IsInProperBranch():
120 """Checks whether the current branch is "master".""" 120 """Checks whether the current branch is "master"."""
121 cmd = ['rev-parse', '--abbrev-ref', 'HEAD'] 121 cmd = ['rev-parse', '--abbrev-ref', 'HEAD']
122 log_output = bisect_utils.CheckRunGit(cmd) 122 log_output = bisect_utils.CheckRunGit(cmd)
123 log_output = log_output.strip() 123 log_output = log_output.strip()
124 return log_output == 'master' 124 return log_output == 'master'
125 125
126 126
127 def GetCommitPosition(git_revision, cwd=None): 127 def GetCommitPosition(git_revision, cwd=None):
128 """Finds git commit postion for the given git hash. 128 """Finds git commit position for the given git hash.
129 129
130 This function executes "git footer --position-num <git hash>" command to get 130 This function executes "git footer --position-num <git hash>" command to get
131 commit position the given revision. 131 commit position the given revision.
132 132
133 Args: 133 Args:
134 git_revision: The git SHA1 to use. 134 git_revision: The git SHA1 to use.
135 cwd: Working directory to run the command from. 135 cwd: Working directory to run the command from.
136 136
137 Returns: 137 Returns:
138 Git commit position as integer or None. 138 Git commit position as integer or None.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 'log', 224 'log',
225 '--format=%H', 225 '--format=%H',
226 '%s~1..%s' % (revision_start, revision_end), 226 '%s~1..%s' % (revision_start, revision_end),
227 '--', 227 '--',
228 filename, 228 filename,
229 ] 229 ]
230 output = bisect_utils.CheckRunGit(cmd) 230 output = bisect_utils.CheckRunGit(cmd)
231 lines = output.split('\n') 231 lines = output.split('\n')
232 return [o for o in lines if o] 232 return [o for o in lines if o]
233 233
OLDNEW
« no previous file with comments | « tools/auto_bisect/fetch_build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698