| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 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 import optparse | 5 import optparse |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 import webbrowser | 10 import webbrowser |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 """ | 330 """ |
| 331 map = [] | 331 map = [] |
| 332 for file_info in files_info: | 332 for file_info in files_info: |
| 333 map.append(file_info[2] + "/" + file_info[3]) | 333 map.append(file_info[2] + "/" + file_info[3]) |
| 334 return map | 334 return map |
| 335 | 335 |
| 336 def prompt(question): | 336 def prompt(question): |
| 337 answer = None | 337 answer = None |
| 338 | 338 |
| 339 while not answer: | 339 while not answer: |
| 340 print question + " [y|n]:" | 340 print question + " [y|n]:", |
| 341 answer = sys.stdin.readline() | 341 answer = sys.stdin.readline() |
| 342 if answer.lower().startswith('n'): | 342 if answer.lower().startswith('n'): |
| 343 return False | 343 return False |
| 344 elif answer.lower().startswith('y'): | 344 elif answer.lower().startswith('y'): |
| 345 return True | 345 return True |
| 346 else: | 346 else: |
| 347 answer = None | 347 answer = None |
| 348 | 348 |
| 349 def text_prompt(question, default): | 349 def text_prompt(question, default): |
| 350 print question + " [" + default + "]:" | 350 print question + " [" + default + "]:" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 482 |
| 483 if not options.merge and not options.revert: | 483 if not options.merge and not options.revert: |
| 484 option_parser.error("You need at least --merge or --revert") | 484 option_parser.error("You need at least --merge or --revert") |
| 485 sys.exit(1) | 485 sys.exit(1) |
| 486 | 486 |
| 487 if options.merge and not options.branch: | 487 if options.merge and not options.branch: |
| 488 option_parser.error("--merge requires a --branch") | 488 option_parser.error("--merge requires a --branch") |
| 489 sys.exit(1) | 489 sys.exit(1) |
| 490 | 490 |
| 491 sys.exit(main(options, args)) | 491 sys.exit(main(options, args)) |
| OLD | NEW |