diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 8231d7d277..0cdc15b26e 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -52,7 +52,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#411)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#413)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -68,7 +68,7 @@ Args: manifest_name: The name of the manifest to upload to LogDog. This must be unique for the whole build. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#388)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#390)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 2bf154902c..217f03b94d 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -128,8 +128,10 @@ class BotUpdateApi(recipe_api.RecipeApi): if patch: repo_url = self.m.tryserver.gerrit_change_repo_url fetch_ref = self.m.tryserver.gerrit_change_fetch_ref - if repo_url and fetch_ref: - flags.append(['--patch_ref', '%s@%s' % (repo_url, fetch_ref)]) + target_ref = self.m.tryserver.gerrit_change_target_ref + if repo_url and fetch_ref and target_ref: + flags.append( + ['--patch_ref', '%s@%s:%s' % (repo_url, target_ref, fetch_ref)]) if patch_refs: flags.extend( ['--patch_ref', patch_ref] 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 d023d167da..a3ef456ccf 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" 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 15e69d6ccf..db8c4931ec 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", + "https://chromium.googlesource.com/angle/angle@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", 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 84cf400b34..7443bf367a 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" 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 5b1a618c4f..0654a4bd5e 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" 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 f8551c48ef..c93c3029f9 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--disable-syntax-validation" 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 15e69d6ccf..db8c4931ec 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", + "https://chromium.googlesource.com/angle/angle@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json index 717544d5fd..71c195f74c 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/branch-heads/67:refs/changes/56/123456/7", "--revision", "src@refs/branch-heads/67", "--refs", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json index fc5623ba40..6374012711 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", + "https://chromium.googlesource.com/chromium/src@refs/heads/experimental/feature:refs/changes/56/123456/7", "--revision", "src@experimental/feature", "--disable-syntax-validation" diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json index d1a08a03b5..6b71257d2e 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/heads/experimental/feature:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", 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 c7de0a0e4f..b4b4ccd2bf 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://webrtc.googlesource.com/src@refs/changes/56/123456/7", + "https://webrtc.googlesource.com/src@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json index 910d6882d5..ab573ea574 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision", 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 fb1108b7ae..ac2147030e 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 @@ -56,7 +56,7 @@ "--output_json", "/path/to/tmp/json", "--patch_ref", - "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", + "https://chromium.googlesource.com/v8/v8@refs/heads/master:refs/changes/56/123456/7", "--revision", "src@HEAD", "--revision",