| Index: tools/metrics/histograms/update_extension_functions.py
|
| diff --git a/tools/metrics/histograms/update_extension_functions.py b/tools/metrics/histograms/update_extension_functions.py
|
| index 1925c6e4e4ea7d707f5cbe53202c790ff206a4bf..9b34c9f91f2f8479557d2bda27fd27cc348a6961 100644
|
| --- a/tools/metrics/histograms/update_extension_functions.py
|
| +++ b/tools/metrics/histograms/update_extension_functions.py
|
| @@ -13,9 +13,11 @@ import re
|
| import sys
|
|
|
| from xml.dom import minidom
|
| +import print_style
|
|
|
| -from diffutil import PromptUserToAcceptDiff
|
| -from pretty_print import PrettyPrintNode
|
| +# 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 = 'ExtensionFunctions'
|
| @@ -136,7 +138,8 @@ 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)
|
|
|