aboutsummaryrefslogtreecommitdiff
path: root/b4/mbox.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-24 18:14:49 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-24 18:14:49 -0400
commit40c23a568562ec9cc8f81ac8336c257a3b7091e6 (patch)
treea4071227d23d4062c3194187438b969e77908545 /b4/mbox.py
parent9475be9cbeaaf2d7e8bac022a5ac6df8d580cb98 (diff)
downloadb4-40c23a568562ec9cc8f81ac8336c257a3b7091e6.tar.gz
Warn when we are ignoring trailers
Provide a warning when we are ignoring trailers due to from/name mismatch between the headers and the body. Also provides a -S,--sloppy-trailers option to ignore all mismatches. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r--b4/mbox.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index 5e301c2..7043fa1 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -113,7 +113,7 @@ def mbox_to_am(mboxfile, config, cmdargs):
for key, msg in mbx.items():
lmbx.add_message(msg)
- lser = lmbx.get_series(revision=wantver)
+ lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers)
if lser is None and wantver is None:
logger.critical('No patches found.')
return
@@ -156,6 +156,13 @@ def mbox_to_am(mboxfile, config, cmdargs):
for trailer in lser.patches[0].followup_trailers:
logger.critical(' %s: %s', trailer[0], trailer[1])
logger.critical('NOTE: Rerun with -t to apply them to all patches')
+ if len(lser.trailer_mismatches):
+ logger.critical('---')
+ logger.critical('NOTE: some trailers ignored due to from/email mismatches:')
+ for tvalue, fname, femail in lser.trailer_mismatches:
+ logger.critical(' ! Trailer: %s', tvalue)
+ logger.critical(' From: %s <%s>', fname, femail)
+ logger.critical('NOTE: Rerun with -S to apply them anyway')
logger.critical('---')
if not lser.complete: