Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from recipe_engine import recipe_api | |
| 6 | |
| 7 class GitClApi(recipe_api.RecipeApi): | |
| 8 def __call__(self, subcmd, args, name=None, **kwargs): | |
| 9 if not name: | |
| 10 name = 'git_cl ' + subcmd | |
| 11 if 'cwd' not in kwargs: | |
| 12 kwargs['cwd'] = (self.c and self.c.repo_location) or None | |
|
iannucci
2016/04/29 18:55:20
why not api.path['checkout'] ?
martiniss
2016/04/29 19:26:48
If I switch the recipe roller over to this, then i
| |
| 13 | |
| 14 return self.m.step( | |
| 15 name, [self.package_repo_resource('git_cl.py')] + args, **kwargs) | |
| 16 | |
| 17 def get_description(self, **kwargs): | |
| 18 return self('description', ['-d'], stdout=self.m.raw_io.output(), **kwargs) | |
| 19 | |
| 20 def set_description(self, description, **kwargs): | |
| 21 return self( | |
| 22 'description', ['-n', '-'], | |
| 23 stdout=self.m.raw_io.output(), | |
| 24 stdin=self.m.raw_io.input(data=description), | |
| 25 name='git_cl set description', **kwargs) | |
| OLD | NEW |