aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-09-16 11:11:52 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-16 11:11:52 +0200
commitdbb96230321bade73aad33c2201bf608fd87c930 (patch)
treef9f0f60a4fdb367455d97deb5db56fe05589d073
parentfdcee0690a3588471f7145af5c49078e5f62b0d7 (diff)
Unbreak patch delta output
broken by "pq: Ensure we are working in the right git directory"
-rwxr-xr-xgbp/scripts/pq.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index 51539dc1..fd2ba6ad 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -147,7 +147,7 @@ def format_series_diff(added, removed, options):
return msg
-def commit_patches(repo, branch, patches, options):
+def commit_patches(repo, branch, patches, options, patch_dir):
"""
Commit chanages exported from patch queue
"""
@@ -163,7 +163,7 @@ def commit_patches(repo, branch, patches, options):
except IOError:
# No series file yet
oldpatches = []
- newpatches = [p[len(PATCH_DIR):] for p in patches]
+ newpatches = [p[len(patch_dir):] for p in patches]
# FIXME: handle case were only the contents of the patches changed
added, removed = compare_series(oldpatches, newpatches)
@@ -220,7 +220,7 @@ def export_patches(repo, branch, options):
for patch in patches:
seriesfd.write(os.path.relpath(patch, patch_dir) + '\n')
if options.commit:
- added, removed = commit_patches(repo, branch, patches, options)
+ added, removed = commit_patches(repo, branch, patches, options, patch_dir)
if added:
what = 'patches' if len(added) > 1 else 'patch'
gbp.log.info("Added %s %s to patch series" % (what, ', '.join(added)))