diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 08bdde994..9a41c637d 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -56,7 +56,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#500)(self, bot_update_step):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#498)(self, bot_update_step):** Deapplies a patch, taking care of DEPS and solution revisions properly. @@ -87,7 +87,7 @@ Args: step_test_data: a null function that returns test bot_update.py output. Use test_api.output_json to generate test data. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#477)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#475)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. @@ -105,7 +105,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#36)(self):** -— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#427)(self, bot_update_json, name):** +— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#425)(self, bot_update_json, name):** Set 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 99f8c9553..b1f73851e 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -190,8 +190,6 @@ class BotUpdateApi(recipe_api.RecipeApi): # e.g. they want to force refs/heads/master at the config level. main_repo_path = self._get_commit_repo_path(in_commit, cfg) revisions[main_repo_path] = revisions.get(main_repo_path) or in_commit_rev - if in_commit.id and in_commit.ref: - refs = [in_commit.ref] + refs # Guarantee that first solution has a revision. # TODO(machenbach): We should explicitly pass HEAD for ALL solutions diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic.json index 4faffbe17..89eab3c87 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic.json @@ -16,8 +16,6 @@ "/path/to/tmp/json", "--revision", "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json index 4faffbe17..89eab3c87 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json @@ -16,8 +16,6 @@ "/path/to/tmp/json", "--revision", "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json index d0b552c01..479233710 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json @@ -16,8 +16,6 @@ "/path/to/tmp/json", "--revision", "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/master", "--with_branch_heads", "--disable-syntax-validation" ], diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json index aec6ebe0c..9330bd043 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json @@ -18,8 +18,6 @@ "got_revision@src", "--revision", "src@HEAD", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json index f9a6f3a86..8d50705ac 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json @@ -18,8 +18,6 @@ "got_revision@src", "--revision", "src@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json b/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json index 4faffbe17..89eab3c87 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json @@ -16,8 +16,6 @@ "/path/to/tmp/json", "--revision", "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json index 4fa67c755..632a7c444 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json @@ -16,8 +16,6 @@ "/path/to/tmp/json", "--revision", "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/master", "--disable-syntax-validation" ], "env_suffixes": { diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 28c683758..10659d2e9 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -724,8 +724,6 @@ def _git_checkout(sln, sln_dir, revisions, refs, no_fetch_tags, git_cache_dir, if not path.isdir(sln_dir): git('clone', '--no-checkout', '--local', '--shared', mirror_dir, sln_dir) - # Detach HEAD to be consistent with the non-clone case - git('checkout', 'master', '--detach') _git_disable_gc(sln_dir) else: _git_disable_gc(sln_dir)