OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 | 5 |
6 """Recipe module to ensure a checkout is consistant on a bot.""" | 6 """Recipe module to ensure a checkout is consistant on a bot.""" |
7 | 7 |
8 from recipe_engine import recipe_api | 8 from recipe_engine import recipe_api |
9 | 9 |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 flags = [ | 136 flags = [ |
137 # 1. Do we want to run? (master/builder/slave). | 137 # 1. Do we want to run? (master/builder/slave). |
138 ['--master', master], | 138 ['--master', master], |
139 ['--builder', builder], | 139 ['--builder', builder], |
140 ['--slave', slave], | 140 ['--slave', slave], |
141 | 141 |
142 # 2. What do we want to check out (spec/root/rev/rev_map). | 142 # 2. What do we want to check out (spec/root/rev/rev_map). |
143 ['--spec', spec_string], | 143 ['--spec', spec_string], |
144 ['--root', root], | 144 ['--root', root], |
145 ['--revision_mapping_file', self.m.json.input(rev_map)], | 145 ['--revision_mapping_file', self.m.json.input(rev_map)], |
146 ['--git-cache-dir', self.m.path['git_cache']], | 146 ['--git-cache-dir', cfg.cache_dir], |
147 | 147 |
148 # 3. How to find the patch, if any (issue/patchset/patch_url). | 148 # 3. How to find the patch, if any (issue/patchset/patch_url). |
149 ['--issue', issue], | 149 ['--issue', issue], |
150 ['--patchset', patchset], | 150 ['--patchset', patchset], |
151 ['--patch_url', patch_url], | 151 ['--patch_url', patch_url], |
152 ['--rietveld_server', self.m.properties.get('rietveld')], | 152 ['--rietveld_server', self.m.properties.get('rietveld')], |
153 ['--gerrit_repo', gerrit_repo], | 153 ['--gerrit_repo', gerrit_repo], |
154 ['--gerrit_ref', gerrit_ref], | 154 ['--gerrit_ref', gerrit_ref], |
155 ['--apply_issue_email_file', email_file], | 155 ['--apply_issue_email_file', email_file], |
156 ['--apply_issue_key_file', key_file], | 156 ['--apply_issue_key_file', key_file], |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 # bot_update actually just sets root to be the folder name of the | 271 # bot_update actually just sets root to be the folder name of the |
272 # first solution. | 272 # first solution. |
273 if step_result.json.output['did_run']: | 273 if step_result.json.output['did_run']: |
274 co_root = step_result.json.output['root'] | 274 co_root = step_result.json.output['root'] |
275 cwd = kwargs.get('cwd', self.m.path['slave_build']) | 275 cwd = kwargs.get('cwd', self.m.path['slave_build']) |
276 if 'checkout' not in self.m.path: | 276 if 'checkout' not in self.m.path: |
277 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) | 277 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) |
278 | 278 |
279 return step_result | 279 return step_result |
OLD | NEW |