diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-24 18:14:49 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-24 18:14:49 -0400 |
commit | 40c23a568562ec9cc8f81ac8336c257a3b7091e6 (patch) | |
tree | a4071227d23d4062c3194187438b969e77908545 /b4/mbox.py | |
parent | 9475be9cbeaaf2d7e8bac022a5ac6df8d580cb98 (diff) | |
download | b4-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.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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: |