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

Side by Side Diff: drover.py

Issue 3448001: Revert back to use exec() instead of execfile(). (Closed)
Patch Set: Created 10 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import optparse 6 import optparse
7 import os 7 import os
8 import re 8 import re
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 DEFAULT_WORKING += ("_" + options.branch) 396 DEFAULT_WORKING += ("_" + options.branch)
397 397
398 if not isMinimumSVNVersion(1, 5): 398 if not isMinimumSVNVersion(1, 5):
399 print "You need to use at least SVN version 1.5.x" 399 print "You need to use at least SVN version 1.5.x"
400 return 1 400 return 1
401 401
402 # Override the default properties if there is a drover.properties file. 402 # Override the default properties if there is a drover.properties file.
403 global file_pattern_ 403 global file_pattern_
404 if os.path.exists("drover.properties"): 404 if os.path.exists("drover.properties"):
405 FILE_PATTERN = file_pattern_ 405 FILE_PATTERN = file_pattern_
406 execfile("drover.properties") 406 f = open("drover.properties")
407 exec(f)
408 f.close()
407 if FILE_PATTERN: 409 if FILE_PATTERN:
408 file_pattern_ = FILE_PATTERN 410 file_pattern_ = FILE_PATTERN
409 411
410 if options.revert and options.branch: 412 if options.revert and options.branch:
411 url = BRANCH_URL.replace("$branch", options.branch) 413 url = BRANCH_URL.replace("$branch", options.branch)
412 elif options.merge and options.sbranch: 414 elif options.merge and options.sbranch:
413 url = BRANCH_URL.replace("$branch", options.sbranch) 415 url = BRANCH_URL.replace("$branch", options.sbranch)
414 else: 416 else:
415 url = TRUNK_URL 417 url = TRUNK_URL
416 418
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 551
550 if options.local and (options.revert or options.branch): 552 if options.local and (options.revert or options.branch):
551 option_parser.error("--local cannot be used with --revert or --branch") 553 option_parser.error("--local cannot be used with --revert or --branch")
552 return 1 554 return 1
553 555
554 return drover(options, args) 556 return drover(options, args)
555 557
556 558
557 if __name__ == "__main__": 559 if __name__ == "__main__":
558 sys.exit(main()) 560 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698