diff options
author | Maximiliano Curia <maxy@debian.org> | 2016-08-18 12:53:16 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-09-07 19:15:14 +0200 |
commit | 844ae3cf6086fa66fee0ef8ee25478629f31b4b2 (patch) | |
tree | dbad2e742fa89f1e645d39a64b8cefea4fc8e95b /gbp | |
parent | d6a67c9c1411961dd68dcf48575598a64ea9f3d1 (diff) |
pq: Handle unmerged debian branches (export)
Diffstat (limited to 'gbp')
-rwxr-xr-x | gbp/scripts/pq.py | 11 |
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: |