From: Luis R. Rodriguez Date: Tue, 7 May 2013 03:03:19 +0000 (-0700) Subject: lib/patch.py: add top header parsing support X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9a560f12a21068bfa0d76cc7e0b916dafca9566d;p=openwrt%2Fstaging%2Fblogic.git lib/patch.py: add top header parsing support Add a top_header for cases where a patchset might have a full header that we may want users to keep around. Cc: techtonik@gmail.com Signed-off-by: Luis R. Rodriguez Signed-off-by: Johannes Berg --- diff --git a/lib/patch.py b/lib/patch.py index 4604663a8477..615a3d69b8f1 100644 --- a/lib/patch.py +++ b/lib/patch.py @@ -201,6 +201,7 @@ class PatchSet(object): # list of Patch objects self.items = [] + self.top_header = "" self.errors = 0 # fatal parsing errors self.warnings = 0 # non-critical warnings @@ -303,6 +304,7 @@ class PatchSet(object): if headscan: while not fe.is_empty and not fe.line.startswith("--- "): header.append(fe.line) + self.top_header += fe.line fe.next() if fe.is_empty: if p == None: