Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index 1e6526f26ea9c9dca0f46179f948e5a14216afed..0e7e9dc684a2f4588f1830ef4248da64cadaec1c 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -1014,13 +1014,13 @@ def _CheckCygwinShell(input_api, output_api): |
| def _CheckUserActionUpdate(input_api, output_api): |
| """Checks if any new user action has been added.""" |
| - if any('chromeactions.txt' == input_api.os_path.basename(f) for f in |
| + if any('actions.xml' == input_api.os_path.basename(f) for f in |
| input_api.LocalPaths()): |
| - # If chromeactions.txt is already included in the changelist, the PRESUBMIT |
| - # for chromeactions.txt will do a more complete presubmit check. |
| + # If actions.xml is already included in the changelist, the PRESUBMIT |
| + # for actions.xml will do a more complete presubmit check. |
| return [] |
| - with open('tools/metrics/actions/chromeactions.txt') as f: |
| + with open('tools/metrics/actions/actions.xml') as f: |
| current_actions = f.read() |
| file_filter = lambda f: f.LocalPath().endswith(('.cc', '.mm')) |
| @@ -1030,12 +1030,12 @@ def _CheckUserActionUpdate(input_api, output_api): |
| match = input_api.re.search(action_re, line) |
| if match: |
| for action_name in match.groups(): |
| - name_pattern = r'\t%s\n' % action_name |
| + name_pattern = r'\"%s\"' % action_name |
| if name_pattern not in current_actions: |
|
Ilya Sherman
2014/03/03 23:17:34
Hmm, it would probably be more efficient to parse
yiyaoliu
2014/03/04 15:31:07
Agree that it would be quicker if a search needed.
Alexei Svitkine (slow)
2014/03/04 15:32:13
I'm curious as to the answer here as well. Could y
yiyaoliu
2014/03/04 18:02:54
I tried 0, 1, 2, 4 invocations of UserMetricsActio
|
| return [output_api.PresubmitPromptWarning( |
| 'File %s line %d: %s is missing in ' |
| - 'tools/metrics/actions/chromeactions.txt. Please run ' |
| - 'tools/metrics/actions/extract_actions.py --hash to update.' |
| + 'tools/metrics/actions/actions.xml. Please run ' |
| + 'tools/metrics/actions/extract_actions.py to update.' |
| % (f.LocalPath(), line_num, action_name))] |
| return [] |