Index: roll_dep.py |
diff --git a/roll_dep.py b/roll_dep.py |
index 9097b832176dc8df357ef939ad1b7803fc2c7959..cead95dcb163bc7ac1424a0940c8de1f3c478028 100755 |
--- a/roll_dep.py |
+++ b/roll_dep.py |
@@ -115,8 +115,11 @@ def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit): |
upstream_url = check_output( |
['git', 'config', 'remote.origin.url'], cwd=full_dir).strip() |
log_url = get_log_url(upstream_url, head, roll_to) |
+ cmd = [ |
+ 'git', 'log', commit_range, '--date=short', '--no-merges', |
+ ] |
logs = check_output( |
- ['git', 'log', commit_range, '--date=short', '--format=%ad %ae %s'], |
+ cmd + ['--format=%ad %ae %s'], # Args with '=' are automatically quoted. |
Johann
2015/10/07 18:20:11
so this is kind of messy because for --arg=<string
M-A Ruel
2015/10/07 18:43:11
IIRC, it works with "" but not ''. Please confirm.
|
cwd=full_dir) |
logs = re.sub(r'(?m)^(\d\d\d\d-\d\d-\d\d [^@]+)@[^ ]+( .*)$', r'\1\2', logs) |
Johann
2015/10/07 18:20:11
a potential fix is to rework the regex to remove t
|
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 = '' |
if log_url: |
log_section = log_url + '\n\n' |
- log_section += '$ git log %s --date=short --format=\'%%ad %%ae %%s\'\n' % ( |
- commit_range) |
+ log_section += '$ %s ' % ' '.join(cmd) |
+ log_section += '--format=\'%ad %ae %s\'\n' |
Johann
2015/10/07 18:20:11
without the quotes above, the command printed is $
|
if not no_log and should_show_log(upstream_url): |
if logs.count('\n') > log_limit: |
# Keep the first N log entries. |