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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 options.wait_for_lgtm = not options.force | 861 options.wait_for_lgtm = not options.force |
862 options.force_readline_defaults = not options.manual | 862 options.force_readline_defaults = not options.manual |
863 options.force_upload = not options.manual | 863 options.force_upload = not options.manual |
864 | 864 |
865 # Process script specific options. | 865 # Process script specific options. |
866 if not self._ProcessOptions(options): | 866 if not self._ProcessOptions(options): |
867 parser.print_help() | 867 parser.print_help() |
868 return None | 868 return None |
869 | 869 |
870 if not options.vc_interface: | 870 if not options.vc_interface: |
871 options.vc_interface = "git_svn" | 871 options.vc_interface = "git_read_svn_write" |
872 return options | 872 return options |
873 | 873 |
874 def RunSteps(self, step_classes, args=None): | 874 def RunSteps(self, step_classes, args=None): |
875 options = self.MakeOptions(args) | 875 options = self.MakeOptions(args) |
876 if not options: | 876 if not options: |
877 return 1 | 877 return 1 |
878 | 878 |
879 state_file = "%s-state.json" % self._config["PERSISTFILE_BASENAME"] | 879 state_file = "%s-state.json" % self._config["PERSISTFILE_BASENAME"] |
880 if options.step == 0 and os.path.exists(state_file): | 880 if options.step == 0 and os.path.exists(state_file): |
881 os.remove(state_file) | 881 os.remove(state_file) |
882 | 882 |
883 steps = [] | 883 steps = [] |
884 for (number, step_class) in enumerate(step_classes): | 884 for (number, step_class) in enumerate(step_classes): |
885 steps.append(MakeStep(step_class, number, self._state, self._config, | 885 steps.append(MakeStep(step_class, number, self._state, self._config, |
886 options, self._side_effect_handler)) | 886 options, self._side_effect_handler)) |
887 for step in steps[options.step:]: | 887 for step in steps[options.step:]: |
888 if step.Run(): | 888 if step.Run(): |
889 return 0 | 889 return 0 |
890 return 0 | 890 return 0 |
891 | 891 |
892 def Run(self, args=None): | 892 def Run(self, args=None): |
893 return self.RunSteps(self._Steps(), args) | 893 return self.RunSteps(self._Steps(), args) |
OLD | NEW |