Commit d5bc73d4 authored by Pierre-Antoine Manzagol's avatar Pierre-Antoine Manzagol Committed by Commit Bot

Fix 'git cl format' on windows metrics files

The issue is with directory separators:
"Check that c:\src\chromium\src or 
c:\src\chromium\src\tools/metrics/histograms/pretty_print.py
exist and have execution permission."

BUG=679514

Change-Id: I88a57783ca3bf8aa5af4d83fb34901c2d2385fe9
Reviewed-on: https://chromium-review.googlesource.com/457800Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Pierre-Antoine Manzagol <manzagop@chromium.org>
parent 2e401be1
......@@ -5584,13 +5584,13 @@ def CMDformat(parser, args):
"\nTry running 'gn format' on this file manually.")
metrics_xml_files = [
'tools/metrics/actions/actions.xml',
'tools/metrics/histograms/histograms.xml',
'tools/metrics/rappor/rappor.xml']
os.path.join('tools', 'metrics', 'actions', 'actions.xml'),
os.path.join('tools', 'metrics', 'histograms', 'histograms.xml'),
os.path.join('tools', 'metrics', 'rappor', 'rappor.xml')]
for xml_file in metrics_xml_files:
if xml_file in diff_files:
tool_dir = top_dir + '/' + os.path.dirname(xml_file)
cmd = [tool_dir + '/pretty_print.py', '--non-interactive']
tool_dir = os.path.join(top_dir, os.path.dirname(xml_file))
cmd = [os.path.join(tool_dir, 'pretty_print.py'), '--non-interactive']
if opts.dry_run or opts.diff:
cmd.append('--diff')
stdout = RunCommand(cmd, cwd=top_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment