diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2016-06-26 23:24:31 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-07-11 14:06:44 -0600 |
commit | 57b6b190a8926403dca2444a45c34bed1f62992d (patch) | |
tree | f98446383d8bd405e041cc29568b17cbb43cedcf /tools | |
parent | 0d57718775243c2d2d7ff8c69dad83db08e1030d (diff) | |
download | u-boot-57b6b190a8926403dca2444a45c34bed1f62992d.tar.gz u-boot-57b6b190a8926403dca2444a45c34bed1f62992d.tar.bz2 u-boot-57b6b190a8926403dca2444a45c34bed1f62992d.zip |
tools: patman: Handle missing blank line for 'Series-changes'
'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@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/patman/patchstream.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 9ae977f2df..0612612372 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -177,10 +177,11 @@ 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 a tag is detected if series_tag_match or commit_tag_match or \ cover_match or cover_cc_match or signoff_match: + # but we are already in a section, this means 'END' is missing + # for that section, fix it up. if self.in_section: self.warn.append("Missing 'END' in section '%s'" % self.in_section) if self.in_section == 'cover': @@ -196,6 +197,11 @@ class PatchStream: self.in_section = None self.skip_blank = True self.section = [] + # but we are already in a change list, that means a blank line + # is missing, fix it up. + if self.in_change: + self.warn.append("Missing 'blank line' in section 'Series-changes'") + self.in_change = 0 # If we are in a section, keep collecting lines until we see END if self.in_section: |