launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26679
[Merge] ~ilasc/turnip:add-log-repack-completion into turnip:master
Ioana Lasc has proposed merging ~ilasc/turnip:add-log-repack-completion into turnip:master.
Commit message:
Add log for return of repack call
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ilasc/turnip/+git/turnip/+merge/399720
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/turnip:add-log-repack-completion into turnip:master.
diff --git a/turnip/api/store.py b/turnip/api/store.py
index 8ea2240..545b76e 100644
--- a/turnip/api/store.py
+++ b/turnip/api/store.py
@@ -484,10 +484,17 @@ def repack(repo_path):
repack_args = ['git', 'repack', '-Adq']
- subprocess.check_call(
- repack_args, cwd=repo_path,
- stderr=subprocess.PIPE, stdout=subprocess.PIPE)
-
+ try:
+ subprocess.check_call(
+ repack_args, cwd=repo_path,
+ stderr=subprocess.PIPE, stdout=subprocess.PIPE)
+ logger.info(
+ "Repack completed for repository: "
+ "%s", repo_path)
+ except subprocess.CalledProcessError:
+ logger.info(
+ "Repack failed for repository: "
+ "%s", repo_path)
def get_refs(repo_store, repo_name, exclude_prefixes=None):
"""Return all refs for a git repository."""