Ensure all keys in the bot_update revisions dict use forward slash.

On Windows, the path that gets computed from the gitiles commit uses
backslashes, which won't match the format of the paths that
bot_update.py uses.

Bug: 1047893
Change-Id: Ie1f6c070558fe00d6f4b1f2fd453e430b21a55ed
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2380590
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
changes/90/2380590/5
Garrett Beaty 5 years ago committed by LUCI CQ
parent 2c53a4b613
commit 6c484875cd

@ -58,7 +58,7 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update.
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#515)(self, bot_update_step):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#518)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
@ -89,7 +89,7 @@ Args:
step_test_data: a null function that returns test bot_update.py output.
Use test_api.output_json to generate test data.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#492)(self, project_name, gclient_config=None):**
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#495)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of
a given project.
@ -107,7 +107,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#442)(self, bot_update_json, name):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#445)(self, bot_update_json, name):**
Set a fixed revision for a single dependency using project revision
properties.

@ -197,6 +197,9 @@ class BotUpdateApi(recipe_api.RecipeApi):
# This is necessary because existing builders rely on this behavior,
# e.g. they want to force refs/heads/master at the config level.
in_commit_repo_path = self._get_commit_repo_path(in_commit, cfg)
# The repo_path that comes back on Windows will have backslashes, which
# won't match the paths that the gclient configs and bot_update script use
in_commit_repo_path = in_commit_repo_path.replace(self.m.path.sep, '/')
revisions[in_commit_repo_path] = (
revisions.get(in_commit_repo_path) or in_commit_rev)
parsed_solution_urls = set(

Loading…
Cancel
Save