OLD | NEW |
1 # Copyright (c) 2010 Google Inc. All rights reserved. | 1 # Copyright (c) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
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 disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 log_thread = threading.Thread(name='LogToServer', target=self._log_to_se
rver_thread) | 915 log_thread = threading.Thread(name='LogToServer', target=self._log_to_se
rver_thread) |
916 log_thread.start() | 916 log_thread.start() |
917 try: | 917 try: |
918 old_branch_name = self._tool.scm().current_branch() | 918 old_branch_name = self._tool.scm().current_branch() |
919 self._run_logged_command(['git', 'pull']) | 919 self._run_logged_command(['git', 'pull']) |
920 rebaseline_command = [self._tool.filesystem.join(self._tool.scm().ch
eckout_root, 'Tools', 'Scripts', 'webkit-patch'), 'auto-rebaseline'] | 920 rebaseline_command = [self._tool.filesystem.join(self._tool.scm().ch
eckout_root, 'Tools', 'Scripts', 'webkit-patch'), 'auto-rebaseline'] |
921 if self._verbose: | 921 if self._verbose: |
922 rebaseline_command.append('--verbose') | 922 rebaseline_command.append('--verbose') |
923 self._run_logged_command(rebaseline_command) | 923 self._run_logged_command(rebaseline_command) |
924 except: | 924 except: |
| 925 self._log_queue.put(self.QUIT_LOG) |
925 traceback.print_exc(file=sys.stderr) | 926 traceback.print_exc(file=sys.stderr) |
926 # Sometimes git crashes and leaves us on a detached head. | 927 # Sometimes git crashes and leaves us on a detached head. |
927 self._tool.scm().checkout_branch(old_branch_name) | 928 self._tool.scm().checkout_branch(old_branch_name) |
928 self._log_queue.put(self.QUIT_LOG) | 929 else: |
| 930 self._log_queue.put(self.QUIT_LOG) |
929 log_thread.join() | 931 log_thread.join() |
930 | 932 |
931 def execute(self, options, args, tool): | 933 def execute(self, options, args, tool): |
932 self._verbose = options.verbose | 934 self._verbose = options.verbose |
933 while True: | 935 while True: |
934 self._do_one_rebaseline() | 936 self._do_one_rebaseline() |
935 time.sleep(self.SLEEP_TIME_IN_SECONDS) | 937 time.sleep(self.SLEEP_TIME_IN_SECONDS) |
OLD | NEW |