Chromium Code Reviews| Index: recipe_modules/tryserver/api.py |
| diff --git a/recipe_modules/tryserver/api.py b/recipe_modules/tryserver/api.py |
| index f18c2b5d93227ffe0cf4c351de2dcf3b64dbfdb3..f4a09a37d461c1f527de5d76633f90b0a94b2681 100644 |
| --- a/recipe_modules/tryserver/api.py |
| +++ b/recipe_modules/tryserver/api.py |
| @@ -5,11 +5,15 @@ |
| import collections |
| import contextlib |
| import hashlib |
| +import os |
| +import sys |
| +import uuid |
| from recipe_engine import recipe_api |
| PATCH_STORAGE_RIETVELD = 'rietveld' |
| +PATCH_STORAGE_GERRIT = 'gerrit' |
| PATCH_STORAGE_GIT = 'git' |
| PATCH_STORAGE_SVN = 'svn' |
| @@ -136,11 +140,17 @@ class TryserverApi(recipe_api.RecipeApi): |
| None, 'oauth2' (see also api.rietveld.apply_issue.) |
| """ |
| storage = self.determine_patch_storage() |
| - |
| if storage == PATCH_STORAGE_RIETVELD: |
| return self.m.rietveld.apply_issue( |
| self.m.rietveld.calculate_issue_root(), |
| authentication=authentication) |
| + elif storage == PATCH_STORAGE_GERRIT: |
|
tandrii(chromium)
2016/08/19 14:00:04
Hm, can you move this condition instead to skia re
rmistry
2016/08/19 14:36:08
That makes sense. Will do.
|
| + patch_project = (self.m.properties.get('patch_project') or |
| + self.m.properties.get('project')) |
| + return self.m.bot_update.apply_gerrit_ref( |
| + gerrit_repo=self.m.properties.get('repository') or 'origin', |
| + gerrit_ref=self.m.properties.get('event.patchSet.ref'), |
| + root=str(self.m.path['slave_build'].join(patch_project))) |
| elif storage == PATCH_STORAGE_SVN: |
| return self.apply_from_svn(cwd) |
| elif storage == PATCH_STORAGE_GIT: |