| Index: tools/metrics/histograms/update_editor_commands.py
|
| diff --git a/tools/metrics/histograms/update_editor_commands.py b/tools/metrics/histograms/update_editor_commands.py
|
| index 46e9a58076f0a0ed19372a9ba4dbf85a14b7ad44..1afdf02775d593bfaaca88d03f6848b0ce67dcc0 100644
|
| --- a/tools/metrics/histograms/update_editor_commands.py
|
| +++ b/tools/metrics/histograms/update_editor_commands.py
|
| @@ -9,13 +9,18 @@ If the file was pretty-printed, the updated version is pretty-printed too.
|
| """
|
|
|
| import logging
|
| +import os
|
| import re
|
| import sys
|
|
|
| from xml.dom import minidom
|
|
|
| from diffutil import PromptUserToAcceptDiff
|
| -from pretty_print import PrettyPrintNode
|
| +import print_style
|
| +
|
| +# Import the metrics/common module.
|
| +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
|
| +from diff_util import PromptUserToAcceptDiff
|
|
|
| HISTOGRAMS_PATH = 'histograms.xml'
|
| ENUM_NAME = 'MappedEditingCommands'
|
| @@ -127,7 +132,7 @@ def main():
|
| UpdateHistogramDefinitions(histogram_values, histograms_doc)
|
|
|
| Log('Writing out new histograms file.')
|
| - new_xml = PrettyPrintNode(histograms_doc)
|
| + new_xml = print_style.GetPrintStyle().PrettyPrintNode(histograms_doc)
|
| if PromptUserToAcceptDiff(xml, new_xml, 'Is the updated version acceptable?'):
|
| with open(HISTOGRAMS_PATH, 'wb') as f:
|
| f.write(new_xml)
|
|
|