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

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

Issue 662403003: Fix mistake in crrev.com/650223005. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | 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 os 7 import os
8 8
9 import bisect_utils 9 import bisect_utils
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 log_output = bisect_utils.CheckRunGit(cmd, cwd=cwd) 52 log_output = bisect_utils.CheckRunGit(cmd, cwd=cwd)
53 53
54 revision_hash_list = log_output.split() 54 revision_hash_list = log_output.split()
55 revision_hash_list.append(start_revision_hash) 55 revision_hash_list.append(start_revision_hash)
56 56
57 return revision_hash_list 57 return revision_hash_list
58 58
59 59
60 def SyncToRevision(revision, sync_client=None): 60 def SyncToRevision(revision, sync_client=None):
61 if not sync_client: 61 if not sync_client:
62 _, return_code = bisect_utils.RunGit(['checkout', revision])[1] 62 _, return_code = bisect_utils.RunGit(['checkout', revision])
63 elif sync_client == 'gclient': 63 elif sync_client == 'gclient':
64 return_code = SyncToRevisionWithGClient(revision) 64 return_code = SyncToRevisionWithGClient(revision)
65 elif sync_client == 'repo': 65 elif sync_client == 'repo':
66 return_code = SyncToRevisionWithRepo(revision) 66 return_code = SyncToRevisionWithRepo(revision)
67 else: 67 else:
68 raise NotImplementedError('Unsupported sync_client: "%s"' % sync_client) 68 raise NotImplementedError('Unsupported sync_client: "%s"' % sync_client)
69 69
70 return not return_code 70 return not return_code
71 71
72 72
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 'log', 254 'log',
255 '--format=%H', 255 '--format=%H',
256 '%s~1..%s' % (revision_start, revision_end), 256 '%s~1..%s' % (revision_start, revision_end),
257 '--', 257 '--',
258 filename, 258 filename,
259 ] 259 ]
260 output = bisect_utils.CheckRunGit(cmd) 260 output = bisect_utils.CheckRunGit(cmd)
261 lines = output.split('\n') 261 lines = output.split('\n')
262 return [o for o in lines if o] 262 return [o for o in lines if o]
263 263
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698