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

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

Issue 530213003: Use author name and email-id instead of committer information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 the SourceControl class and related functions.""" 5 """This module contains the SourceControl class and related functions."""
6 6
7 import os 7 import os
8 import re 8 import re
9 9
10 from . import bisect_utils 10 from . import bisect_utils
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 { 255 {
256 'author': %s, 256 'author': %s,
257 'email': %s, 257 'email': %s,
258 'date': %s, 258 'date': %s,
259 'subject': %s, 259 'subject': %s,
260 'body': %s, 260 'body': %s,
261 } 261 }
262 """ 262 """
263 commit_info = {} 263 commit_info = {}
264 264
265 formats = ['%cN', '%cE', '%s', '%cD', '%b'] 265 formats = ['%aN', '%aE', '%s', '%cD', '%b']
266 targets = ['author', 'email', 'subject', 'date', 'body'] 266 targets = ['author', 'email', 'subject', 'date', 'body']
267 267
268 for i in xrange(len(formats)): 268 for i in xrange(len(formats)):
269 cmd = ['log', '--format=%s' % formats[i], '-1', revision] 269 cmd = ['log', '--format=%s' % formats[i], '-1', revision]
270 output = bisect_utils.CheckRunGit(cmd, cwd=cwd) 270 output = bisect_utils.CheckRunGit(cmd, cwd=cwd)
271 commit_info[targets[i]] = output.rstrip() 271 commit_info[targets[i]] = output.rstrip()
272 272
273 return commit_info 273 return commit_info
274 274
275 def CheckoutFileAtRevision(self, file_name, revision, cwd=None): 275 def CheckoutFileAtRevision(self, file_name, revision, cwd=None):
(...skipping 25 matching lines...) Expand all
301 revision_end: End of revision range. 301 revision_end: End of revision range.
302 302
303 Returns: 303 Returns:
304 Returns a list of commits that touched this file. 304 Returns a list of commits that touched this file.
305 """ 305 """
306 cmd = ['log', '--format=%H', '%s~1..%s' % (revision_start, revision_end), 306 cmd = ['log', '--format=%H', '%s~1..%s' % (revision_start, revision_end),
307 '--', filename] 307 '--', filename]
308 output = bisect_utils.CheckRunGit(cmd) 308 output = bisect_utils.CheckRunGit(cmd)
309 309
310 return [o for o in output.split('\n') if o] 310 return [o for o in output.split('\n') if o]
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