mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchutils.py: Add support for parsing Signed-off-by headers.
This commit is contained in:
parent
ff889f6cdc
commit
6efa37655c
7
debian/tools/patchutils.py
vendored
7
debian/tools/patchutils.py
vendored
@ -54,6 +54,7 @@ class PatchObject(object):
|
||||
self.patch_email = header['email']
|
||||
self.patch_subject = header['subject']
|
||||
self.patch_revision = header['revision'] if header.has_key('revision') else 1
|
||||
self.signed_off_by = header['signedoffby'] if header.has_key('signedoffby') else []
|
||||
|
||||
self.filename = filename
|
||||
self.offset_begin = None
|
||||
@ -329,6 +330,12 @@ def read_patch(filename):
|
||||
if not subject.endswith("."): subject += "."
|
||||
header['subject'], header['revision'] = subject, revision
|
||||
|
||||
elif line.startswith("Signed-off-by: "):
|
||||
if not header.has_key('signedoffby'):
|
||||
header['signedoffby'] = []
|
||||
header['signedoffby'].append(_parse_author(line[15:]))
|
||||
assert fp.read() == line
|
||||
|
||||
elif line.startswith("diff --git "):
|
||||
tmp = line.strip().split(" ")
|
||||
if len(tmp) != 4: raise PatchParserError("Unable to parse git diff header line '%s'." % line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user