← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lp-codeimport:git-progress into lp-codeimport:master

 

Colin Watson has proposed merging ~cjwatson/lp-codeimport:git-progress into lp-codeimport:master.

Commit message:
Force "git clone" to report progress status

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lp-codeimport/+git/lp-codeimport/+merge/406075

This should avoid spurious timeouts if cloning the repository from Launchpad takes a while.  We already have arrangements to throttle progress output so that it doesn't end up being too noisy in logs.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-codeimport:git-progress into lp-codeimport:master.
diff --git a/lib/lp/codehosting/codeimport/worker.py b/lib/lp/codehosting/codeimport/worker.py
index 5f4ee29..40a7f1e 100644
--- a/lib/lp/codehosting/codeimport/worker.py
+++ b/lib/lp/codehosting/codeimport/worker.py
@@ -1168,7 +1168,8 @@ class GitToGitImportWorker(ImportWorker):
         # that have both a non-empty username and a non-empty password.
         self._logger.info("Getting existing repository from hosting service.")
         try:
-            self._runGit("clone", "--mirror", target_url, "repository")
+            self._runGit(
+                "clone", "--progress", "--mirror", target_url, "repository")
         except subprocess.CalledProcessError as e:
             self._logger.info(
                 "Unable to get existing repository from hosting service: "