OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 the V8 project authors. All rights reserved. | 2 # Copyright 2014 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 PrepareSVN, | 348 PrepareSVN, |
349 TagRevision, | 349 TagRevision, |
350 CleanUp, | 350 CleanUp, |
351 ] | 351 ] |
352 | 352 |
353 RunScript(step_classes, config, options, side_effect_handler) | 353 RunScript(step_classes, config, options, side_effect_handler) |
354 | 354 |
355 | 355 |
356 def BuildOptions(): | 356 def BuildOptions(): |
357 result = optparse.OptionParser() | 357 result = optparse.OptionParser() |
| 358 result.set_usage("""%prog [OPTIONS]... [BRANCH] [REVISION]... |
| 359 |
| 360 Performs the necessary steps to merge revisions from bleeding_edge |
| 361 to other branches, including trunk.""") |
358 result.add_option("-f", | 362 result.add_option("-f", |
359 help="Delete sentinel file.", | 363 help="Delete sentinel file.", |
360 default=False, action="store_true") | 364 default=False, action="store_true") |
361 result.add_option("-m", "--message", | 365 result.add_option("-m", "--message", |
362 help="Specify a commit message for the patch.") | 366 help="Specify a commit message for the patch.") |
363 result.add_option("-r", "--revert", | 367 result.add_option("-r", "--revert", |
364 help="Revert specified patches.", | 368 help="Revert specified patches.", |
365 default=False, action="store_true") | 369 default=False, action="store_true") |
366 result.add_option("-R", "--revert-bleeding-edge", | 370 result.add_option("-R", "--revert-bleeding-edge", |
367 help="Revert specified patches from bleeding edge.", | 371 help="Revert specified patches from bleeding edge.", |
(...skipping 21 matching lines...) Expand all Loading... |
389 return False | 393 return False |
390 return True | 394 return True |
391 | 395 |
392 | 396 |
393 def Main(): | 397 def Main(): |
394 parser = BuildOptions() | 398 parser = BuildOptions() |
395 (options, args) = parser.parse_args() | 399 (options, args) = parser.parse_args() |
396 if not ProcessOptions(options, args): | 400 if not ProcessOptions(options, args): |
397 parser.print_help() | 401 parser.print_help() |
398 return 1 | 402 return 1 |
399 RunMergeToBranch(CONFIG, MergeToBranchOptions(options)) | 403 RunMergeToBranch(CONFIG, MergeToBranchOptions(options, args)) |
400 | 404 |
401 if __name__ == "__main__": | 405 if __name__ == "__main__": |
402 sys.exit(Main()) | 406 sys.exit(Main()) |
OLD | NEW |