[U-Boot] [PATCH 3/3] tools: patman: Handle missing blank line for 'Series-changes'

Bin Meng bmeng.cn at gmail.com
Fri Jun 24 16:45:21 CEST 2016


'Series-changes' uses blank line to indicate its end. If that is
missing, series internal state variable 'in_change' may be wrong.
Correct its state.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---

 tools/patman/patchstream.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 5573326..338b581 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -173,10 +173,10 @@ class PatchStream:
         elif commit_match:
             self.state = STATE_MSG_HEADER
 
-        # If a tag is detected, but we are already in a section,
-        # this means 'END' is missing for that section, fix it up.
         if series_tag_match or commit_tag_match or \
            cover_cc_match or signoff_match:
+            # If a tag is detected, but we are already in a section,
+            # this means 'END' is missing for that section, fix it up.
             if self.in_section:
                 if self.in_section == 'cover':
                     self.series.cover = self.section
@@ -191,6 +191,10 @@ class PatchStream:
                 self.in_section = None
                 self.skip_blank = True
                 self.section = []
+            # If a tag is detected, but we are already in a change list,
+            # that means a blank line is missing, fix it up.
+            if self.in_change:
+                self.in_change = 0
 
         # If we are in a section, keep collecting lines until we see END
         if self.in_section:
-- 
2.7.4



More information about the U-Boot mailing list