Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: tools/metrics/common/diff_util.py

Issue 180743027: Re-land: Change actions.txt to actions.xml (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/metrics/actions/print_style.py ('k') | tools/metrics/common/pretty_print_xml.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Utility functions for prompting user if changes automatically applied to some 5 """Utility functions for prompting user if changes automatically applied to some
6 user-managed files are correct. 6 user-managed files are correct.
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
(...skipping 27 matching lines...) Expand all
38 try: 38 try:
39 temp.write(html_diff) 39 temp.write(html_diff)
40 temp.close() # Close the file so the browser process can access it. 40 temp.close() # Close the file so the browser process can access it.
41 webbrowser.open('file://' + temp.name) 41 webbrowser.open('file://' + temp.name)
42 print prompt 42 print prompt
43 response = raw_input('(Y/n): ').strip().lower() 43 response = raw_input('(Y/n): ').strip().lower()
44 finally: 44 finally:
45 temp.close() # May be called on already closed file. 45 temp.close() # May be called on already closed file.
46 os.remove(temp.name) 46 os.remove(temp.name)
47 return response == 'y' or response == '' 47 return response == 'y' or response == ''
OLDNEW
« no previous file with comments | « tools/metrics/actions/print_style.py ('k') | tools/metrics/common/pretty_print_xml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698