Add --no-merges to roll_dep.py

Print only the most interesting commit messages.

R=maruel@chromium.org

Review URL: https://codereview.chromium.org/1390073005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297050 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
johannkoenig@google.com 10 years ago
parent b9658c343c
commit 64f2fc3b2c

@ -115,8 +115,11 @@ def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit):
upstream_url = check_output( upstream_url = check_output(
['git', 'config', 'remote.origin.url'], cwd=full_dir).strip() ['git', 'config', 'remote.origin.url'], cwd=full_dir).strip()
log_url = get_log_url(upstream_url, head, roll_to) log_url = get_log_url(upstream_url, head, roll_to)
cmd = [
'git', 'log', commit_range, '--date=short', '--no-merges',
]
logs = check_output( logs = check_output(
['git', 'log', commit_range, '--date=short', '--format=%ad %ae %s'], cmd + ['--format=%ad %ae %s'], # Args with '=' are automatically quoted.
cwd=full_dir) cwd=full_dir)
logs = re.sub(r'(?m)^(\d\d\d\d-\d\d-\d\d [^@]+)@[^ ]+( .*)$', r'\1\2', logs) logs = re.sub(r'(?m)^(\d\d\d\d-\d\d-\d\d [^@]+)@[^ ]+( .*)$', r'\1\2', logs)
nb_commits = logs.count('\n') nb_commits = logs.count('\n')
@ -130,8 +133,8 @@ def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit):
log_section = '' log_section = ''
if log_url: if log_url:
log_section = log_url + '\n\n' log_section = log_url + '\n\n'
log_section += '$ git log %s --date=short --format=\'%%ad %%ae %%s\'\n' % ( log_section += '$ %s ' % ' '.join(cmd)
commit_range) log_section += '--format=\'%ad %ae %s\'\n'
if not no_log and should_show_log(upstream_url): if not no_log and should_show_log(upstream_url):
if logs.count('\n') > log_limit: if logs.count('\n') > log_limit:
# Keep the first N log entries. # Keep the first N log entries.

Loading…
Cancel
Save