diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index b23964e2b..29276a644 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#531)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#527)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -95,7 +95,7 @@ Args: bot_update module ONLY supports one change. Users may specify a change via tryserver.set_change() and explicitly set this flag False. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#508)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#504)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. @@ -111,7 +111,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#47)(self):** -— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#459)(self, bot_update_json, name):** +— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#455)(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 da229664b..09fef64cb 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -450,11 +450,7 @@ class BotUpdateApi(recipe_api.RecipeApi): if not patch_path or path != patch_path: return 'HEAD' - target_ref = self.m.tryserver.gerrit_change_target_ref - if target_ref == 'refs/heads/main': - return 'HEAD' - - return target_ref + return self.m.tryserver.gerrit_change_target_ref def resolve_fixed_revision(self, bot_update_json, name): """Sets a fixed revision for a single dependency using project revision diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json index dbb8f26f6..b6be1abee 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json @@ -62,7 +62,9 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/heads/main:refs/changes/56/123456/7", "--revision", - "src@HEAD", + "src@refs/heads/main", + "--refs", + "refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json index d0d24e257..0853a0b7f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json @@ -64,7 +64,7 @@ "--revision", "src@HEAD", "--revision", - "src/third_party/angle@HEAD", + "src/third_party/angle@refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json index 25284e202..b58f8467f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json @@ -62,7 +62,9 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/heads/main:refs/changes/56/123456/7", "--revision", - "src@HEAD", + "src@refs/heads/main", + "--refs", + "refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json index 17b35a943..d72fa0d26 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json @@ -62,7 +62,9 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/heads/main:refs/changes/56/123456/7", "--revision", - "src@HEAD", + "src@refs/heads/main", + "--refs", + "refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json index 43001a8d2..5cb3316d1 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json @@ -62,7 +62,9 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/heads/main:refs/changes/56/123456/7", "--revision", - "src@HEAD", + "src@refs/heads/main", + "--refs", + "refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json index d0d24e257..0853a0b7f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json @@ -64,7 +64,7 @@ "--revision", "src@HEAD", "--revision", - "src/third_party/angle@HEAD", + "src/third_party/angle@refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json index d7e7dfc4e..e8e4882bf 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json @@ -64,7 +64,7 @@ "--revision", "src@HEAD", "--revision", - "src/third_party/webrtc@HEAD", + "src/third_party/webrtc@refs/heads/main", "--disable-syntax-validation" ], "env": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json index c8927dcbb..df9b7b22f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json @@ -64,7 +64,7 @@ "--revision", "src@HEAD", "--revision", - "src/v8@HEAD", + "src/v8@refs/heads/main", "--disable-syntax-validation" ], "env": {