Merge ~nobuto/lp-codeimport:verbose into lp-codeimport:master

Proposed by Nobuto Murata
Status: Merged
Approved by: Colin Watson
Approved revision: 6015bb8abeed9b091baa0b4ff6fbdd3b654b5952
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~nobuto/lp-codeimport:verbose
Merge into: lp-codeimport:master
Diff against target: 42 lines (+7/-4)
1 file modified
lib/lp/codehosting/codeimport/worker.py (+7/-4)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+453279@code.launchpad.net

Commit message

Enable verbose logging for git operations

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/codehosting/codeimport/worker.py b/lib/lp/codehosting/codeimport/worker.py
2index 9bd9444..0afc073 100644
3--- a/lib/lp/codehosting/codeimport/worker.py
4+++ b/lib/lp/codehosting/codeimport/worker.py
5@@ -1178,7 +1178,8 @@ class GitToGitImportWorker(ImportWorker):
6 self._logger.info("Getting existing repository from hosting service.")
7 try:
8 self._runGit(
9- "clone", "--progress", "--mirror", target_url, "repository")
10+ "clone", "--progress", "--verbose", "--mirror",
11+ target_url, "repository")
12 except subprocess.CalledProcessError as e:
13 self._logger.info(
14 "Unable to get existing repository from hosting service: "
15@@ -1193,7 +1194,8 @@ class GitToGitImportWorker(ImportWorker):
16 "remote", "add", "source", self.source_details.url,
17 cwd="repository")
18 self._runGit(
19- "fetch", "--progress", "--prune", "source", "+refs/*:refs/*",
20+ "fetch", "--progress", "--verbose", "--prune",
21+ "source", "+refs/*:refs/*",
22 cwd="repository")
23 try:
24 new_head = self._getHead("repository", "source")
25@@ -1213,14 +1215,15 @@ class GitToGitImportWorker(ImportWorker):
26 # Push the target of HEAD first to ensure that it is always
27 # available.
28 self._runGit(
29- "push", "--progress", target_url,
30+ "push", "--progress", "--verbose", target_url,
31 "+%s:%s" % (new_head, new_head), cwd="repository")
32 try:
33 self._setHead(target_url, new_head)
34 except GitProtocolError as e:
35 self._logger.info("Unable to set default branch: %s" % e)
36 self._runGit(
37- "push", "--progress", "--mirror", target_url, cwd="repository")
38+ "push", "--progress", "--verbose", "--mirror",
39+ target_url, cwd="repository")
40 except subprocess.CalledProcessError as e:
41 self._logger.info(
42 "Unable to push to hosting service: git push exited %s" %

Subscribers

People subscribed via source and target branches