Commit b96f2d5b authored by nodir's avatar nodir Committed by Commit bot

Revert of bot_update: fix git dir check (patchset #1 id:1 of...

Revert of bot_update: fix git dir check (patchset #1 id:1 of https://codereview.chromium.org/2174923002/ )

Reason for revert:
this is wrong. if directory is not empty, git clone fails

Original issue's description:
> 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=
>
> Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/cdac80c9fb4768bdc5bc42734e852e1f216224c9

TBR=hinoka@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2173683003
parent 565adb55
...@@ -834,7 +834,7 @@ def need_to_run_deps2git(repo_base, deps_file, deps_git_file): ...@@ -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() last_known_deps_git_ref, cwd=repo_base).strip()
# If the merge base of the last DEPS and last .DEPS.git file is not # If the merge base of the last DEPS and last .DEPS.git file is not
# equivalent to the hash of the last DEPS file, that means the DEPS file # equivilent to the hash of the last DEPS file, that means the DEPS file
# was committed after the last .DEPS.git file. # was committed after the last .DEPS.git file.
return last_known_deps_ref != merge_base_ref return last_known_deps_ref != merge_base_ref
...@@ -966,7 +966,7 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir): ...@@ -966,7 +966,7 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir):
'clone', '--no-checkout', '--local', '--shared', mirror_dir, sln_dir) 'clone', '--no-checkout', '--local', '--shared', mirror_dir, sln_dir)
try: try:
if not path.isdir(os.path.join(sln_dir, '.git')): if not path.isdir(sln_dir):
git(*clone_cmd) git(*clone_cmd)
else: else:
git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir) git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment