aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaximiliano Curia <maxy@debian.org>2016-08-18 12:53:16 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-07 19:15:14 +0200
commit844ae3cf6086fa66fee0ef8ee25478629f31b4b2 (patch)
treedbad2e742fa89f1e645d39a64b8cefea4fc8e95b
parentd6a67c9c1411961dd68dcf48575598a64ea9f3d1 (diff)
pq: Handle unmerged debian branches (export)
-rwxr-xr-xgbp/scripts/pq.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index d756ca33..9a97c093 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -202,7 +202,16 @@ def export_patches(repo, branch, options):
else:
gbp.log.debug("%s does not exist." % PATCH_DIR)
- patches = generate_patches(repo, branch, pq_branch, PATCH_DIR, options)
+ if options.pq_from.upper() == 'TAG':
+ vfs = gbp.git.vfs.GitVfs(repo, branch)
+ source = DebianSource(vfs)
+ upstream_commit = find_upstream_commit(repo, source.changelog,
+ options.upstream_tag)
+ base = upstream_commit
+ else:
+ base = branch
+
+ patches = generate_patches(repo, base, pq_branch, PATCH_DIR, options)
if patches:
with open(SERIES_FILE, 'w') as seriesfd: