aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-01-31 14:48:32 +0100
committerMilo Casagrande <milo@ubuntu.com>2013-01-31 14:48:32 +0100
commitd0b9efe4ac7f5f1076c9bf3c77fda25b57d84432 (patch)
treebda251e2a4055736a6c3d71fd4c16fd93b95be09
parent1565f4a7b20bc725e3e56e2bf3c58f78e4af981f (diff)
downloadrhodecode-config-d0b9efe4ac7f5f1076c9bf3c77fda25b57d84432.tar.gz
Fixed git cloning command.
-rw-r--r--scripts/mirror-repos8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mirror-repos b/scripts/mirror-repos
index 2615b1f..728ee15 100644
--- a/scripts/mirror-repos
+++ b/scripts/mirror-repos
@@ -154,7 +154,13 @@ def mirror_repos(file, dest, user=None):
cmd_args = ["git", "clone", "--mirror", full_repo]
logger.info("Cloning repository %s..." % full_repo)
- execute_command(cmd_args, work_dir=full_path, user=user)
+ if user == DEFAULT_USER or not user:
+ execute_command(cmd_args, work_dir=full_path)
+ else:
+ execute_command(cmd_args,
+ work_dir=full_path,
+ as_root=True,
+ user=user)
else:
logger.debug("Skipping repository '%s', does not seem a valid "
"git one." % base_dir)