OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import argparse | 5 import argparse |
6 import datetime | 6 import datetime |
7 import random | 7 import random |
8 import re | 8 import re |
9 import urllib | 9 import urllib |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 solution = self.m.gclient.c.solutions[0] | 156 solution = self.m.gclient.c.solutions[0] |
157 branch = self.m.properties.get('branch', 'master') | 157 branch = self.m.properties.get('branch', 'master') |
158 needs_branch_heads = False | 158 needs_branch_heads = False |
159 if RELEASE_BRANCH_RE.match(branch): | 159 if RELEASE_BRANCH_RE.match(branch): |
160 revision = 'refs/branch-heads/%s:%s' % (branch, revision) | 160 revision = 'refs/branch-heads/%s:%s' % (branch, revision) |
161 needs_branch_heads = True | 161 needs_branch_heads = True |
162 | 162 |
163 solution.revision = revision | 163 solution.revision = revision |
164 update_step = self.m.bot_update.ensure_checkout( | 164 update_step = self.m.bot_update.ensure_checkout( |
165 no_shallow=True, | 165 no_shallow=True, |
166 patch_root='TODO(TANDRII): REMOVE THIS TRANSITION TO patch_projects', | |
167 output_manifest=True, | 166 output_manifest=True, |
168 with_branch_heads=needs_branch_heads, | 167 with_branch_heads=needs_branch_heads, |
169 **kwargs) | 168 **kwargs) |
170 | 169 |
171 assert update_step.json.output['did_run'] | 170 assert update_step.json.output['did_run'] |
172 | 171 |
173 # Bot_update maintains the properties independent of the UI | 172 # Bot_update maintains the properties independent of the UI |
174 # presentation. | 173 # presentation. |
175 self.revision = self.m.bot_update.last_returned_properties['got_revision'] | 174 self.revision = self.m.bot_update.last_returned_properties['got_revision'] |
176 self.revision_cp = ( | 175 self.revision_cp = ( |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 def report_culprits(self, culprit_range): | 1125 def report_culprits(self, culprit_range): |
1127 assert culprit_range | 1126 assert culprit_range |
1128 if len(culprit_range) > 1: | 1127 if len(culprit_range) > 1: |
1129 text = 'Suspecting multiple commits' | 1128 text = 'Suspecting multiple commits' |
1130 else: | 1129 else: |
1131 text = 'Suspecting %s' % culprit_range[0][:8] | 1130 text = 'Suspecting %s' % culprit_range[0][:8] |
1132 | 1131 |
1133 step_result = self.m.step(text, cmd=None) | 1132 step_result = self.m.step(text, cmd=None) |
1134 for culprit in culprit_range: | 1133 for culprit in culprit_range: |
1135 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit | 1134 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit |
OLD | NEW |