aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/patch_series.py
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-08-12 01:42:42 +0100
committerGuido Günther <agx@sigxcpu.org>2018-08-24 08:44:02 +0200
commit47cf4c686008558403f299c9b065efc47ee2e3d5 (patch)
tree52429c6eaaefc153414e78e82409bd4a41389ef6 /gbp/patch_series.py
parent0304fd3b56d549a74f913799d71e437e9c2c24d5 (diff)
pq import: Always put DEP-3 headers as pseudo-headers
If there are any non-git DEP-3 header fields, put them at the top of the body text, regardless of whether Description or Subject is used. Also put a blank line between them and the rest of the message body.
Diffstat (limited to 'gbp/patch_series.py')
-rw-r--r--gbp/patch_series.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gbp/patch_series.py b/gbp/patch_series.py
index c66ee9d2..3d272fd9 100644
--- a/gbp/patch_series.py
+++ b/gbp/patch_series.py
@@ -218,6 +218,7 @@ class Dep3Patch(Patch):
return 1
changes = 0
+ pseudo_headers = ''
long_desc = self._dep3_get_value(headers.get('long_desc', list()))
for k, v in headers.items():
@@ -230,10 +231,12 @@ class Dep3Patch(Patch):
elif k == 'long_desc':
pass
else:
- long_desc += ''.join(v)
+ pseudo_headers += ''.join(v)
changes += 1
if changes:
- self.long_desc = long_desc + self.long_desc
+ self.long_desc = (pseudo_headers +
+ ('\n' if pseudo_headers else '') +
+ long_desc + self.long_desc)
def _check_dep3(self):
"""