Commit 47cf4c68 authored by Ben Hutchings's avatar Ben Hutchings Committed by Guido Günther

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.
parent 0304fd3b
......@@ -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):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment