| OLD | NEW |
| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if options.branch: | 395 if options.branch: |
| 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 f = open("drover.properties") | 405 FILE_PATTERN = file_pattern_ |
| 406 exec(f) | 406 execfile("drover.properties") |
| 407 f.close() | 407 file_pattern_ = FILE_PATTERN |
| 408 if FILE_PATTERN: | |
| 409 file_pattern_ = FILE_PATTERN | |
| 410 | 408 |
| 411 if options.revert and options.branch: | 409 if options.revert and options.branch: |
| 412 url = BRANCH_URL.replace("$branch", options.branch) | 410 url = BRANCH_URL.replace("$branch", options.branch) |
| 413 elif options.merge and options.sbranch: | 411 elif options.merge and options.sbranch: |
| 414 url = BRANCH_URL.replace("$branch", options.sbranch) | 412 url = BRANCH_URL.replace("$branch", options.sbranch) |
| 415 else: | 413 else: |
| 416 url = TRUNK_URL | 414 url = TRUNK_URL |
| 417 | 415 |
| 418 working = options.workdir or DEFAULT_WORKING | 416 working = options.workdir or DEFAULT_WORKING |
| 419 | 417 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 548 |
| 551 if options.local and (options.revert or options.branch): | 549 if options.local and (options.revert or options.branch): |
| 552 option_parser.error("--local cannot be used with --revert or --branch") | 550 option_parser.error("--local cannot be used with --revert or --branch") |
| 553 return 1 | 551 return 1 |
| 554 | 552 |
| 555 return drover(options, args) | 553 return drover(options, args) |
| 556 | 554 |
| 557 | 555 |
| 558 if __name__ == "__main__": | 556 if __name__ == "__main__": |
| 559 sys.exit(main()) | 557 sys.exit(main()) |
| OLD | NEW |