OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 MESSAGE = "Upload for code review." | 550 MESSAGE = "Upload for code review." |
551 | 551 |
552 def RunStep(self): | 552 def RunStep(self): |
553 if self._options.reviewer: | 553 if self._options.reviewer: |
554 print "Using account %s for review." % self._options.reviewer | 554 print "Using account %s for review." % self._options.reviewer |
555 reviewer = self._options.reviewer | 555 reviewer = self._options.reviewer |
556 else: | 556 else: |
557 print "Please enter the email address of a V8 reviewer for your patch: ", | 557 print "Please enter the email address of a V8 reviewer for your patch: ", |
558 self.DieNoManualMode("A reviewer must be specified in forced mode.") | 558 self.DieNoManualMode("A reviewer must be specified in forced mode.") |
559 reviewer = self.ReadLine() | 559 reviewer = self.ReadLine() |
560 self.GitUpload(reviewer, self._options.author, self._options.force_upload) | 560 self.GitUpload(reviewer, self._options.author, self._options.force_upload, |
| 561 bypass_hooks=self._options.bypass_upload_hooks) |
561 | 562 |
562 | 563 |
563 class DetermineV8Sheriff(Step): | 564 class DetermineV8Sheriff(Step): |
564 MESSAGE = "Determine the V8 sheriff for code review." | 565 MESSAGE = "Determine the V8 sheriff for code review." |
565 | 566 |
566 def RunStep(self): | 567 def RunStep(self): |
567 self["sheriff"] = None | 568 self["sheriff"] = None |
568 if not self._options.sheriff: # pragma: no cover | 569 if not self._options.sheriff: # pragma: no cover |
569 return | 570 return |
570 | 571 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 parser.print_help() | 674 parser.print_help() |
674 return None | 675 return None |
675 if options.svn and not options.svn_config: | 676 if options.svn and not options.svn_config: |
676 print "Using pure svn for committing requires also --svn-config" | 677 print "Using pure svn for committing requires also --svn-config" |
677 parser.print_help() | 678 parser.print_help() |
678 return None | 679 return None |
679 | 680 |
680 # Defaults for options, common to all scripts. | 681 # Defaults for options, common to all scripts. |
681 options.manual = getattr(options, "manual", True) | 682 options.manual = getattr(options, "manual", True) |
682 options.force = getattr(options, "force", False) | 683 options.force = getattr(options, "force", False) |
| 684 options.bypass_upload_hooks = False |
683 | 685 |
684 # Derived options. | 686 # Derived options. |
685 options.requires_editor = not options.force | 687 options.requires_editor = not options.force |
686 options.wait_for_lgtm = not options.force | 688 options.wait_for_lgtm = not options.force |
687 options.force_readline_defaults = not options.manual | 689 options.force_readline_defaults = not options.manual |
688 options.force_upload = not options.manual | 690 options.force_upload = not options.manual |
689 | 691 |
690 # Process script specific options. | 692 # Process script specific options. |
691 if not self._ProcessOptions(options): | 693 if not self._ProcessOptions(options): |
692 parser.print_help() | 694 parser.print_help() |
(...skipping 13 matching lines...) Expand all Loading... |
706 for (number, step_class) in enumerate(step_classes): | 708 for (number, step_class) in enumerate(step_classes): |
707 steps.append(MakeStep(step_class, number, self._state, self._config, | 709 steps.append(MakeStep(step_class, number, self._state, self._config, |
708 options, self._side_effect_handler)) | 710 options, self._side_effect_handler)) |
709 for step in steps[options.step:]: | 711 for step in steps[options.step:]: |
710 if step.Run(): | 712 if step.Run(): |
711 return 0 | 713 return 0 |
712 return 0 | 714 return 0 |
713 | 715 |
714 def Run(self, args=None): | 716 def Run(self, args=None): |
715 return self.RunSteps(self._Steps(), args) | 717 return self.RunSteps(self._Steps(), args) |
OLD | NEW |