| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 456 |
| 457 # Note that the commit succeeded for commit throttling. | 457 # Note that the commit succeeded for commit throttling. |
| 458 self.recent_commit_timestamps.append(time.time()) | 458 self.recent_commit_timestamps.append(time.time()) |
| 459 self.recent_commit_timestamps = ( | 459 self.recent_commit_timestamps = ( |
| 460 self.recent_commit_timestamps[-(self.MAX_COMMIT_BURST + 1):]) | 460 self.recent_commit_timestamps[-(self.MAX_COMMIT_BURST + 1):]) |
| 461 | 461 |
| 462 viewvc_url = self.context.checkout.get_settings('VIEW_VC') | 462 viewvc_url = self.context.checkout.get_settings('VIEW_VC') |
| 463 issue_desc = git_cl.ChangeDescription(pending.description) | 463 issue_desc = git_cl.ChangeDescription(pending.description) |
| 464 msg = 'Committed: %s' % pending.revision | 464 msg = 'Committed: %s' % pending.revision |
| 465 if viewvc_url: | 465 if viewvc_url: |
| 466 viewvc_url = '%s%s' % (viewvc_url.rstrip('/'), pending.revision) | 466 if 'googlesource' not in viewvc_url: |
| 467 viewvc_url = viewvc_url.rstrip('/') |
| 468 viewvc_url = '%s%s' % (viewvc_url, pending.revision) |
| 467 msg = 'Committed: %s' % viewvc_url | 469 msg = 'Committed: %s' % viewvc_url |
| 468 issue_desc.append_footer(msg) | 470 issue_desc.append_footer(msg) |
| 469 | 471 |
| 470 # Update the CQ dashboard. | 472 # Update the CQ dashboard. |
| 471 self.context.status.send( | 473 self.context.status.send( |
| 472 pending, | 474 pending, |
| 473 { 'verification': 'commit', | 475 { 'verification': 'commit', |
| 474 'payload': { | 476 'payload': { |
| 475 'revision': pending.revision, | 477 'revision': pending.revision, |
| 476 'output': msg, | 478 'output': msg, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 """Loads the commit queue state from a JSON file.""" | 544 """Loads the commit queue state from a JSON file.""" |
| 543 self.queue = model.load_from_json_file(filename) | 545 self.queue = model.load_from_json_file(filename) |
| 544 | 546 |
| 545 def save(self, filename): | 547 def save(self, filename): |
| 546 """Save the commit queue state in a simple JSON file.""" | 548 """Save the commit queue state in a simple JSON file.""" |
| 547 model.save_to_json_file(filename, self.queue) | 549 model.save_to_json_file(filename, self.queue) |
| 548 | 550 |
| 549 def close(self): | 551 def close(self): |
| 550 """Close all the active pending manager items.""" | 552 """Close all the active pending manager items.""" |
| 551 self.context.status.close() | 553 self.context.status.close() |
| OLD | NEW |