| 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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 # takes a long time and sometimes fails, but we don't want to commit
if, e.g. the | 867 # takes a long time and sometimes fails, but we don't want to commit
if, e.g. the |
| 868 # tree is closed. | 868 # tree is closed. |
| 869 did_finish = self._run_git_cl_command(options, ['upload', '-f']) | 869 did_finish = self._run_git_cl_command(options, ['upload', '-f']) |
| 870 | 870 |
| 871 if did_finish: | 871 if did_finish: |
| 872 # Uploading can take a very long time. Do another pull to make s
ure TestExpectations is up to date, | 872 # Uploading can take a very long time. Do another pull to make s
ure TestExpectations is up to date, |
| 873 # so the dcommit can go through. | 873 # so the dcommit can go through. |
| 874 # FIXME: Log the pull and dcommit stdout/stderr to the log-serve
r. | 874 # FIXME: Log the pull and dcommit stdout/stderr to the log-serve
r. |
| 875 tool.executive.run_command(['git', 'pull']) | 875 tool.executive.run_command(['git', 'pull']) |
| 876 | 876 |
| 877 self._run_git_cl_command(options, ['dcommit', '-f']) | 877 self._run_git_cl_command(options, ['land', '-f', '-v']) |
| 878 except: | 878 except: |
| 879 traceback.print_exc(file=sys.stderr) | 879 traceback.print_exc(file=sys.stderr) |
| 880 finally: | 880 finally: |
| 881 if did_finish: | 881 if did_finish: |
| 882 # Close the issue if dcommit failed. | 882 # Close the issue if dcommit failed. |
| 883 issue_already_closed = tool.executive.run_command( | 883 issue_already_closed = tool.executive.run_command( |
| 884 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline_bra
nch_name], | 884 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline_bra
nch_name], |
| 885 return_exit_code=True) | 885 return_exit_code=True) |
| 886 if not issue_already_closed: | 886 if not issue_already_closed: |
| 887 self._run_git_cl_command(options, ['set_close']) | 887 self._run_git_cl_command(options, ['set_close']) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 self._tool.scm().checkout_branch(old_branch_name_or_ref) | 965 self._tool.scm().checkout_branch(old_branch_name_or_ref) |
| 966 else: | 966 else: |
| 967 self._log_queue.put(self.QUIT_LOG) | 967 self._log_queue.put(self.QUIT_LOG) |
| 968 log_thread.join() | 968 log_thread.join() |
| 969 | 969 |
| 970 def execute(self, options, args, tool): | 970 def execute(self, options, args, tool): |
| 971 self._verbose = options.verbose | 971 self._verbose = options.verbose |
| 972 while True: | 972 while True: |
| 973 self._do_one_rebaseline() | 973 self._do_one_rebaseline() |
| 974 time.sleep(self.SLEEP_TIME_IN_SECONDS) | 974 time.sleep(self.SLEEP_TIME_IN_SECONDS) |
| OLD | NEW |