diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index c2a5d542b..c39ff4d6c 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -58,7 +58,7 @@ Recipe module to ensure a checkout is consistent on a bot. Wrapper for easy calling of bot_update. -— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#524)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#525)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -91,7 +91,7 @@ Args: * enforce_fetch: Enforce a new fetch to refresh the git cache, even if the solution revision passed in already exists in the current git cache. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#501)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#502)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. @@ -109,7 +109,7 @@ Returns (list of str): All properties that'll hold the checked-out revision   **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):** -— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#452)(self, bot_update_json, name):** +— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#453)(self, bot_update_json, name):** Sets a fixed revision for a single dependency using project revision properties. diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 86c95cdad..d3d34a65f 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -424,7 +424,7 @@ class BotUpdateApi(recipe_api.RecipeApi): If there's no Gerrit CL associated with the run, returns 'HEAD'. Otherwise this queries Gerrit for the correct destination ref, which - might differ from refs/heads/master. + might differ from refs/heads/master or refs/heads/main. Args: * cfg: The used gclient config. @@ -434,7 +434,8 @@ class BotUpdateApi(recipe_api.RecipeApi): Returns: A destination ref as understood by bot_update.py if available - and if different from refs/heads/master, returns 'HEAD' otherwise. + and if different from refs/heads/master or refs/heads/main, returns + 'HEAD' otherwise. """ # Ignore project paths other than the one belonging to the current CL. patch_path = self.m.gclient.get_gerrit_patch_root(gclient_config=cfg) @@ -444,7 +445,7 @@ class BotUpdateApi(recipe_api.RecipeApi): return 'HEAD' target_ref = self.m.tryserver.gerrit_change_target_ref - if target_ref in ['refs/heads/master', 'refs/heads/master']: + if target_ref in ['refs/heads/main', 'refs/heads/master']: return 'HEAD' return target_ref