From cdac80c9fb4768bdc5bc42734e852e1f216224c9 Mon Sep 17 00:00:00 2001 From: nodir Date: Fri, 22 Jul 2016 12:05:55 -0700 Subject: [PATCH] bot_update: fix git dir check existance of a dir does not mean it is a git repo. Check .git dir presence instead. This is the reason why swarmbucket build.git builds fail. TBR=hinoka@chromium.org BUG= Review-Url: https://codereview.chromium.org/2174923002 --- recipe_modules/bot_update/resources/bot_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py index bfc7b7feb..d12d7fcac 100755 --- a/recipe_modules/bot_update/resources/bot_update.py +++ b/recipe_modules/bot_update/resources/bot_update.py @@ -834,7 +834,7 @@ def need_to_run_deps2git(repo_base, deps_file, deps_git_file): last_known_deps_git_ref, cwd=repo_base).strip() # If the merge base of the last DEPS and last .DEPS.git file is not - # equivilent to the hash of the last DEPS file, that means the DEPS file + # equivalent to the hash of the last DEPS file, that means the DEPS file # was committed after the last .DEPS.git file. return last_known_deps_ref != merge_base_ref @@ -966,7 +966,7 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir): 'clone', '--no-checkout', '--local', '--shared', mirror_dir, sln_dir) try: - if not path.isdir(sln_dir): + if not path.isdir(os.path.join(sln_dir, '.git')): git(*clone_cmd) else: git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)