diff options
author | Tom Rini <trini@konsulko.com> | 2021-08-01 14:41:22 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-01 14:41:22 -0400 |
commit | 72ffb41a873722993d89c02bae4743a8ad6f16f9 (patch) | |
tree | 2508a115df4604adc9395b4f72e8ec3ec8fff90f /tools/patman/patchstream.py | |
parent | 5371593aed56ee11cbb6cc6ac8d058fcd9b8f58c (diff) | |
parent | eec44c7218a3c3ce924a282cc46a59e83feb9de1 (diff) |
Merge tag 'dm-pull-1aug21' of https://source.denx.de/u-boot/custodians/u-boot-dm
sandbox TPM-emulator improvements
rST documentation and fixes for moveconfig
handle empty 'ranges' property in dtoc
patman warning for invalid tag
clean-ups to 'fdt add' command
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r-- | tools/patman/patchstream.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index a44cd861af..b960292427 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -59,6 +59,9 @@ RE_DIFF = re.compile(r'^>.*diff --git a/(.*) b/(.*)$') # Detect a context line, like '> @@ -153,8 +153,13 @@ CheckPatch RE_LINE = re.compile(r'>.*@@ \-(\d+),\d+ \+(\d+),\d+ @@ *(.*)') +# Detect line with invalid TAG +RE_INV_TAG = re.compile('^Serie-([a-z-]*): *(.*)') + # States we can be in - can we use range() and still have comments? STATE_MSG_HEADER = 0 # Still in the message header STATE_PATCH_SUBJECT = 1 # In patch subject (first line of log for a commit) @@ -318,6 +321,7 @@ class PatchStream: leading_whitespace_match = RE_LEADING_WHITESPACE.match(line) diff_match = RE_DIFF.match(line) line_match = RE_LINE.match(line) + invalid_match = RE_INV_TAG.match(line) tag_match = None if self.state == STATE_PATCH_HEADER: tag_match = RE_TAG.match(line) @@ -471,6 +475,11 @@ class PatchStream: self._add_warn('Line %d: Ignoring Commit-%s' % (self.linenum, name)) + # Detect invalid tags + elif invalid_match: + raise ValueError("Line %d: Invalid tag = '%s'" % + (self.linenum, line)) + # Detect the start of a new commit elif commit_match: self._close_commit() |