From 39a6a7dbb1a296da0634d55451811d175fb512c6 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Sun, 25 Jan 2015 14:59:40 +0530 Subject: [PATCH] Take care of shallow clones in migrate-to-v5 --- bench/migrate_to_v5.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bench/migrate_to_v5.py b/bench/migrate_to_v5.py index 5b9119c6..897c0af9 100644 --- a/bench/migrate_to_v5.py +++ b/bench/migrate_to_v5.py @@ -42,8 +42,9 @@ def validate_v4(bench='.'): def checkout_v5(repo, bench='.'): cwd = os.path.join(bench, 'apps', repo) + unshallow = "--unshallow" if os.path.exists(os.path.join(cwd, ".git", "shallow")) else "" if os.path.exists(cwd): - exec_cmd("git fetch upstream", cwd=cwd) + exec_cmd("git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'", cwd=cwd) + exec_cmd("git fetch upstream {unshallow}".format(unshallow=unshallow), cwd=cwd) exec_cmd("git checkout v5.0", cwd=cwd) exec_cmd("git clean -df", cwd=cwd) -