From 7b54572eb0c18346d82a76e85b854c3ec316a3bd Mon Sep 17 00:00:00 2001 From: Nodir Turakulov Date: Tue, 18 Sep 2018 17:28:47 +0000 Subject: [PATCH] [gclient] Fix typo in get_gerrit_patch_root https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1217670/17 used solution instead of solution name. TBR=tandrii@chromium.org Recipe-Nontrivial-Roll: build Recipe-Nontrivial-Roll: infra Bug: 694348 Change-Id: I829cba9223d73383791b018f9a23598443e8fa2c Reviewed-on: https://chromium-review.googlesource.com/1231278 Reviewed-by: Nodir Turakulov Reviewed-by: Andrii Shyshkalov Commit-Queue: Nodir Turakulov --- recipes/README.recipes.md | 8 +++++--- recipes/recipe_modules/gclient/api.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 7eb3a1615..432b89b5f 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -248,7 +248,7 @@ Wrapper for easy calling of gclient steps. Remove all index.lock files. If a previous run of git crashed, bot was reset, etc... we might end up with leftover index.lock files. -— **def [calculate\_patch\_root](/recipes/recipe_modules/gclient/api.py#360)(self, patch_project, gclient_config=None, patch_repo=None):** +— **def [calculate\_patch\_root](/recipes/recipe_modules/gclient/api.py#362)(self, patch_project, gclient_config=None, patch_repo=None):** Returns path where a patch should be applied to based patch_project. @@ -287,8 +287,10 @@ or repo_path_map, returns name of the first solution. This is done solely for backward compatibility with existing tests. Please do not rely on this logic in new code. Instead, properly map a repository to a local path using repo_path_map. +TODO(nodir): remove this. Update all recipe tests to specify a git_repo +matching the recipe. -— **def [get\_repo\_path](/recipes/recipe_modules/gclient/api.py#330)(self, repo_url, gclient_config=None):** +— **def [get\_repo\_path](/recipes/recipe_modules/gclient/api.py#332)(self, repo_url, gclient_config=None):** Returns local path to the repo checkout given its url. @@ -327,7 +329,7 @@ Chromium config. This may happen for one of two reasons: — **def [runhooks](/recipes/recipe_modules/gclient/api.py#264)(self, args=None, name='runhooks', \*\*kwargs):** -— **def [set\_patch\_project\_revision](/recipes/recipe_modules/gclient/api.py#397)(self, patch_project, gclient_config=None):** +— **def [set\_patch\_project\_revision](/recipes/recipe_modules/gclient/api.py#399)(self, patch_project, gclient_config=None):** Updates config revision corresponding to patch_project. diff --git a/recipes/recipe_modules/gclient/api.py b/recipes/recipe_modules/gclient/api.py index f8f137d8e..0d57ae069 100644 --- a/recipes/recipe_modules/gclient/api.py +++ b/recipes/recipe_modules/gclient/api.py @@ -321,7 +321,7 @@ class GclientApi(recipe_api.RecipeApi): root = self.get_repo_path(repo_url, gclient_config=cfg) # This is wrong, but that's what a ton of recipe tests expect today - root = root or cfg.solutions[0] + root = root or cfg.solutions[0].name return root