aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-06-03 16:28:00 +0200
committerGuido Günther <agx@sigxcpu.org>2016-06-03 16:43:27 +0200
commit1989c329bd968a2e9cf92a5165c8ffef3a9794bb (patch)
tree83b535bcd1130fb3ad939cacc91fdd63643bc230
parentf2d56788f18fcfc2bb4ba6dcf6f8da00a6321802 (diff)
pq: Report number of imported patches
-rwxr-xr-xgbp/scripts/pq.py8
-rwxr-xr-xgbp/scripts/pq_rpm.py4
2 files changed, 7 insertions, 5 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index 5dfe4c2..8f1f404 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -308,6 +308,8 @@ def import_quilt_patches(repo, branch, series, tries, force):
gbp.log.debug("Remove temporary patch safe '%s'" % tmpdir)
shutil.rmtree(tmpdir)
+ return len(queue)
+
def rebase_pq(repo, branch):
if is_pq_branch(branch):
@@ -402,10 +404,10 @@ def main(argv):
elif action == "import":
series = SERIES_FILE
tries = options.time_machine if (options.time_machine > 0) else 1
- import_quilt_patches(repo, current, series, tries, options.force)
+ num = import_quilt_patches(repo, current, series, tries, options.force)
current = repo.get_branch()
- gbp.log.info("Patches listed in '%s' imported on '%s'" %
- (series, current))
+ gbp.log.info("%d patches listed in '%s' imported on '%s'" %
+ (num, series, current))
elif action == "drop":
drop_pq(repo, current)
elif action == "rebase":
diff --git a/gbp/scripts/pq_rpm.py b/gbp/scripts/pq_rpm.py
index 660807a..1f0082a 100755
--- a/gbp/scripts/pq_rpm.py
+++ b/gbp/scripts/pq_rpm.py
@@ -323,8 +323,8 @@ def import_spec_patches(repo, options):
repo.delete_branch(pq_branch)
raise GbpError('Import failed: %s' % err)
- gbp.log.info("Patches listed in '%s' imported on '%s'" % (spec.specfile,
- pq_branch))
+ gbp.log.info("%d patches listed in '%s' imported on '%s'" % (len(queue), spec.specfile,
+ pq_branch))
def rebase_pq(repo, options):