| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 def _ProcessOptions(self, options): | 585 def _ProcessOptions(self, options): |
| 586 return True | 586 return True |
| 587 | 587 |
| 588 def _Steps(self): # pragma: no cover | 588 def _Steps(self): # pragma: no cover |
| 589 raise Exception("Not implemented.") | 589 raise Exception("Not implemented.") |
| 590 | 590 |
| 591 def MakeOptions(self, args=None): | 591 def MakeOptions(self, args=None): |
| 592 parser = argparse.ArgumentParser(description=self._Description()) | 592 parser = argparse.ArgumentParser(description=self._Description()) |
| 593 parser.add_argument("-a", "--author", default="", | 593 parser.add_argument("-a", "--author", default="", |
| 594 help="The author email used for rietveld.") | 594 help="The author email used for rietveld.") |
| 595 parser.add_argument("--dry-run", default=False, action="store_true", |
| 596 help="Perform only read-only actions.") |
| 595 parser.add_argument("-g", "--googlers-mapping", | 597 parser.add_argument("-g", "--googlers-mapping", |
| 596 help="Path to the script mapping google accounts.") | 598 help="Path to the script mapping google accounts.") |
| 597 parser.add_argument("-r", "--reviewer", default="", | 599 parser.add_argument("-r", "--reviewer", default="", |
| 598 help="The account name to be used for reviews.") | 600 help="The account name to be used for reviews.") |
| 599 parser.add_argument("--sheriff", default=False, action="store_true", | 601 parser.add_argument("--sheriff", default=False, action="store_true", |
| 600 help=("Determine current sheriff to review CLs. On " | 602 help=("Determine current sheriff to review CLs. On " |
| 601 "success, this will overwrite the reviewer " | 603 "success, this will overwrite the reviewer " |
| 602 "option.")) | 604 "option.")) |
| 603 parser.add_argument("-s", "--step", | 605 parser.add_argument("-s", "--step", |
| 604 help="Specify the step where to start work. Default: 0.", | 606 help="Specify the step where to start work. Default: 0.", |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 for (number, step_class) in enumerate(step_classes): | 652 for (number, step_class) in enumerate(step_classes): |
| 651 steps.append(MakeStep(step_class, number, self._state, self._config, | 653 steps.append(MakeStep(step_class, number, self._state, self._config, |
| 652 options, self._side_effect_handler)) | 654 options, self._side_effect_handler)) |
| 653 for step in steps[options.step:]: | 655 for step in steps[options.step:]: |
| 654 if step.Run(): | 656 if step.Run(): |
| 655 return 1 | 657 return 1 |
| 656 return 0 | 658 return 0 |
| 657 | 659 |
| 658 def Run(self, args=None): | 660 def Run(self, args=None): |
| 659 return self.RunSteps(self._Steps(), args) | 661 return self.RunSteps(self._Steps(), args) |
| OLD | NEW |