OLD | NEW |
1 # coding=utf8 | 1 # coding=utf8 |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 """Commit queue manager class. | 5 """Commit queue manager class. |
6 | 6 |
7 Security implications: | 7 Security implications: |
8 | 8 |
9 The following hypothesis are made: | 9 The following hypothesis are made: |
10 - Commit queue: | 10 - Commit queue: |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 'simply the monkeys went out for dinner.\n' | 139 'simply the monkeys went out for dinner.\n' |
140 'Please email commit-bot@chromium.org with the CL url.') | 140 'Please email commit-bot@chromium.org with the CL url.') |
141 DESCRIPTION_UPDATED = ( | 141 DESCRIPTION_UPDATED = ( |
142 'Commit queue rejected this change because the description was changed\n' | 142 'Commit queue rejected this change because the description was changed\n' |
143 'between the time the change entered the commit queue and the time it\n' | 143 'between the time the change entered the commit queue and the time it\n' |
144 'was ready to commit. You can safely check the commit box again.') | 144 'was ready to commit. You can safely check the commit box again.') |
145 TRYING_PATCH = 'CQ is trying da patch. Follow status at\n' | 145 TRYING_PATCH = 'CQ is trying da patch. Follow status at\n' |
146 # Maximum number of commits done in a burst. | 146 # Maximum number of commits done in a burst. |
147 MAX_COMMIT_BURST = 4 | 147 MAX_COMMIT_BURST = 4 |
148 # Delay (secs) between commit bursts. | 148 # Delay (secs) between commit bursts. |
149 COMMIT_BURST_DELAY = 10*60 | 149 COMMIT_BURST_DELAY = 8*60 |
150 | 150 |
151 def __init__(self, context_obj, pre_patch_verifiers, verifiers, | 151 def __init__(self, context_obj, pre_patch_verifiers, verifiers, |
152 project_name=''): | 152 project_name=''): |
153 """ | 153 """ |
154 Args: | 154 Args: |
155 pre_patch_verifiers: Verifiers objects that are run before applying the | 155 pre_patch_verifiers: Verifiers objects that are run before applying the |
156 patch. | 156 patch. |
157 verifiers: Verifiers object run after applying the patch. | 157 verifiers: Verifiers object run after applying the patch. |
158 """ | 158 """ |
159 if not(len(pre_patch_verifiers) or len(verifiers)): | 159 if not(len(pre_patch_verifiers) or len(verifiers)): |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 """Loads the commit queue state from a JSON file.""" | 560 """Loads the commit queue state from a JSON file.""" |
561 self.queue = model.load_from_json_file(filename) | 561 self.queue = model.load_from_json_file(filename) |
562 | 562 |
563 def save(self, filename): | 563 def save(self, filename): |
564 """Save the commit queue state in a simple JSON file.""" | 564 """Save the commit queue state in a simple JSON file.""" |
565 model.save_to_json_file(filename, self.queue) | 565 model.save_to_json_file(filename, self.queue) |
566 | 566 |
567 def close(self): | 567 def close(self): |
568 """Close all the active pending manager items.""" | 568 """Close all the active pending manager items.""" |
569 self.context.status.close() | 569 self.context.status.close() |
OLD | NEW |