From 0b62ed79ed5049332f58c06dbdb8e8bc4105010e Mon Sep 17 00:00:00 2001 From: John Budorick Date: Fri, 5 Apr 2019 23:19:11 +0000 Subject: [PATCH] Revert "[bot_update] Default to refs/heads/master" This reverts commit 9198ef8ede661f96912f5f226d566ae1f1998f7b. Reason for revert: Spec revert: appears to be causing large number of chromium CQ failures on patch application. Original change's description: > [bot_update] Default to refs/heads/master > > When revision is not specified, currently HEAD is checked out. > Change the default to refs/heads/master > > Recipe-Nontrivial-Roll: infra > Recipe-Nontrivial-Roll: build > Recipe-Nontrivial-Roll: build_limited_scripts_slave > Bug: 940214 > Change-Id: I8be59095d90447ea898d5247a6433f0734f5e63b > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1554862 > Commit-Queue: Nodir Turakulov > Reviewed-by: Andrii Shyshkalov TBR=nodir@chromium.org,tandrii@chromium.org,jbudorick@chromium.org Change-Id: Icafd817d8f044a4347342bd85dc97d193329a704 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 940214 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1555514 Reviewed-by: John Budorick Commit-Queue: John Budorick --- recipes/README.recipes.md | 4 +- recipes/recipe_modules/bot_update/api.py | 48 +++++++++++++++---- .../examples/full.expected/clobber.json | 4 +- .../deprecated_got_revision_mapping.json | 4 +- .../gerrit_no_rebase_patch_ref.json | 4 +- .../full.expected/gerrit_no_reset.json | 4 +- .../full.expected/multiple_patch_refs.json | 4 +- .../no_apply_patch_on_gclient.json | 4 +- .../examples/full.expected/refs.json | 4 +- .../examples/full.expected/tryjob_fail.json | 2 +- .../full.expected/tryjob_fail_patch.json | 4 +- .../tryjob_fail_patch_download.json | 4 +- .../full.expected/tryjob_gerrit_angle.json | 4 +- .../tryjob_gerrit_branch_heads.json | 2 +- .../tryjob_gerrit_feature_branch.json | 6 +-- .../tryjob_gerrit_v8_feature_branch.json | 8 ++-- .../full.expected/tryjob_gerrit_webrtc.json | 4 +- .../examples/full.expected/tryjob_v8.json | 4 +- .../tryjob_v8_head_by_default.json | 4 +- .../examples/full.expected/with_tags.json | 4 +- .../fetch_end_to_end_test.expected/basic.json | 4 +- 21 files changed, 79 insertions(+), 51 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index f7db52d3f..f6df95456 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#420)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#452)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -77,7 +77,7 @@ Args: When sorting builds by commit position, this commit will be used. Requires falsy ignore_input_commit. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#397)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#429)(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 1f46c46b6..3b13fef22 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -105,7 +105,7 @@ class BotUpdateApi(recipe_api.RecipeApi): assert oauth2_json is None, "oauth2_json is deprecated" assert not (ignore_input_commit and set_output_commit) - refs = list(refs or []) + refs = refs or [] # We can re-use the gclient spec from the gclient module, since all the # data bot_update needs is already configured into the gclient spec. cfg = gclient_config or self.m.gclient.c @@ -174,11 +174,7 @@ class BotUpdateApi(recipe_api.RecipeApi): # TODO(machenbach): We should explicitly pass HEAD for ALL solutions # that don't specify anything else. first_sol = cfg.solutions[0].name - revisions[first_sol] = ( - revisions.get(first_sol) or - self.m.tryserver.gerrit_change_target_ref or - 'refs/heads/master' - ) + revisions[first_sol] = revisions.get(first_sol) or 'HEAD' if cfg.revisions: # Only update with non-empty values. Some recipe might otherwise @@ -199,10 +195,12 @@ class BotUpdateApi(recipe_api.RecipeApi): fixed_revision = self.m.gclient.resolve_revision(revision) if fixed_revision: fixed_revisions[name] = fixed_revision + if fixed_revision.upper() == 'HEAD': + # Sync to correct destination branch if HEAD was specified. + fixed_revision = self._destination_branch(cfg, name) # If we're syncing to a ref, we want to make sure it exists before # trying to check it out. if (fixed_revision.startswith('refs/') and - fixed_revision != 'refs/heads/master' and # TODO(crbug.com/874501): fetching additional refs is currently # only supported for the root solution. We should investigate # supporting it for other dependencies. @@ -312,7 +310,7 @@ class BotUpdateApi(recipe_api.RecipeApi): assert ( input_commit.ref and # Revision was not overridden. - revisions[main_repo_path] == input_commit_rev), input_commit + revisions[main_repo_path] == input_commit_rev) output_commit.ref = input_commit.ref output_commit.host, output_commit.project = ( self.m.gitiles.parse_repo_url(git_checkout['repo_url'])) @@ -354,6 +352,40 @@ class BotUpdateApi(recipe_api.RecipeApi): return step_result + def _destination_branch(self, cfg, path): + """Returns the destination branch of a CL for the matching project + if available or HEAD otherwise. + + If there's no Gerrit CL associated with the run, returns 'HEAD'. + Otherwise this queries Gerrit for the correct destination branch, which + might differ from master. + + Args: + cfg: The used gclient config. + path: The DEPS path of the project this prefix is for. E.g. 'src' or + 'src/v8'. The query will only be made for the project that matches + the CL's project. + Returns: + A destination branch as understood by bot_update.py if available + and if different from master, 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) + if not patch_path or path != patch_path: + return 'HEAD' + + target_ref = self.m.tryserver.gerrit_change_target_ref + if target_ref == 'refs/heads/master': + return 'HEAD' + + # TODO: Remove. Return ref, not branch. + ret = target_ref + prefix = 'refs/heads/' + if ret.startswith(prefix): + ret = ret[len(prefix):] + + return ret + def _resolve_fixed_revisions(self, bot_update_json): """Set all fixed revisions from the first sync to their respective got_X_revision values. diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json index 5abc136cd..60821e2c4 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@refs/heads/master", + "src@HEAD", "--clobber", "--disable-syntax-validation" ], @@ -31,7 +31,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 70a8f1d32..d023d167d 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--disable-syntax-validation" ], "env_prefixes": { @@ -73,7 +73,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json index 47a0602f9..33413d43b 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@refs/heads/master", + "src@HEAD", "--gerrit_no_rebase_patch_ref", "--disable-syntax-validation" ], @@ -31,7 +31,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json index 4f7df39f0..02c5d6e16 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@refs/heads/master", + "src@HEAD", "--gerrit_no_reset", "--disable-syntax-validation" ], @@ -31,7 +31,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json index b8106ed53..1c68626f2 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json @@ -19,7 +19,7 @@ "--patch_ref", "https://chromium.googlesource.com/v8/v8@refs/changes/124/45/6", "--revision", - "src@refs/heads/master", + "src@HEAD", "--disable-syntax-validation" ], "env_prefixes": { @@ -34,7 +34,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 7d3419d5d..15e69d6cc 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--revision", "src/third_party/angle@HEAD", "--disable-syntax-validation" @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json index 08485bbc6..7b2971a27 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@refs/heads/master", + "src@HEAD", "--refs", "+refs/change/1/2/333", "--disable-syntax-validation" @@ -32,7 +32,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 95cfe8a4a..309d65022 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--disable-syntax-validation" ], "env_prefixes": { 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 9a9d96770..0404d6617 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--disable-syntax-validation" ], "env_prefixes": { @@ -74,7 +74,7 @@ "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"failed_patch_body\": \"Downloading patch...\\nApplying the patch...\\nPatch: foo/bar.py\\nIndex: foo/bar.py\\ndiff --git a/foo/bar.py b/foo/bar.py\\nindex HASH..HASH MODE\\n--- a/foo/bar.py\\n+++ b/foo/bar.py\\ncontext\\n+something\\n-something\\nmore context\", @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 e2c0488d9..e0cffd576 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--disable-syntax-validation" ], "env_prefixes": { @@ -74,7 +74,7 @@ "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"failed_patch_body\": \"Downloading patch...\\nApplying the patch...\\nPatch: foo/bar.py\\nIndex: foo/bar.py\\ndiff --git a/foo/bar.py b/foo/bar.py\\nindex HASH..HASH MODE\\n--- a/foo/bar.py\\n+++ b/foo/bar.py\\ncontext\\n+something\\n-something\\nmore context\", @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 7d3419d5d..15e69d6cc 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--revision", "src/third_party/angle@HEAD", "--disable-syntax-validation" @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 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 c145a56f7..717544d5f 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 @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/branch-heads/67\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 6b906cd6f..fc5623ba4 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 @@ -58,9 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/experimental/feature", - "--refs", - "refs/heads/experimental/feature", + "src@experimental/feature", "--disable-syntax-validation" ], "env_prefixes": { @@ -75,7 +73,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/experimental/feature\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", 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 7dec158b8..d1a08a03b 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 @@ -58,11 +58,9 @@ "--patch_ref", "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", - "src@refs/heads/experimental/feature", + "src@HEAD", "--revision", - "src/v8@HEAD", - "--refs", - "refs/heads/experimental/feature", + "src/v8@experimental/feature", "--disable-syntax-validation" ], "env_prefixes": { @@ -77,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/experimental/feature\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/v8\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 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 6558df951..c7de0a0e4 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://webrtc.googlesource.com/src@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--revision", "src/third_party/webrtc@HEAD", "--disable-syntax-validation" @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/third_party/webrtc\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 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 e8843328f..910d6882d 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--revision", "src/v8@abc", "--disable-syntax-validation" @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/v8\": \"abc\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 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 cf897ba12..fb1108b7a 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 @@ -58,7 +58,7 @@ "--patch_ref", "https://chromium.googlesource.com/v8/v8@refs/changes/56/123456/7", "--revision", - "src@refs/heads/master", + "src@HEAD", "--revision", "src/v8@HEAD", "--disable-syntax-validation" @@ -75,7 +75,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\", @@@", "@@@STEP_LOG_LINE@json.output@ \"src/v8\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json index b288fb715..2e21a83bd 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@refs/heads/master", + "src@HEAD", "--with_tags", "--disable-syntax-validation" ], @@ -31,7 +31,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", diff --git a/recipes/recipes/fetch_end_to_end_test.expected/basic.json b/recipes/recipes/fetch_end_to_end_test.expected/basic.json index 38c30f1b5..4157b45c1 100644 --- a/recipes/recipes/fetch_end_to_end_test.expected/basic.json +++ b/recipes/recipes/fetch_end_to_end_test.expected/basic.json @@ -15,7 +15,7 @@ "--output_json", "/path/to/tmp/json", "--revision", - "depot_tools@refs/heads/master" + "depot_tools@HEAD" ], "env_prefixes": { "PATH": [ @@ -29,7 +29,7 @@ "@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": \"refs/heads/master\"@@@", + "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": \"HEAD\"@@@", "@@@STEP_LOG_LINE@json.output@ }, @@@", "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": {@@@",