diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2014-09-04 10:45:13 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-09-09 16:38:31 -0600 |
commit | 1f7278851ea359063dabc235ff690a5010467956 (patch) | |
tree | b3b2eeb881e46a373c85549d2472a182c103b172 /tools | |
parent | 950a23133d8235778ea29f5d9587edec7d9bbc0a (diff) | |
download | u-boot-imx-1f7278851ea359063dabc235ff690a5010467956.zip u-boot-imx-1f7278851ea359063dabc235ff690a5010467956.tar.gz u-boot-imx-1f7278851ea359063dabc235ff690a5010467956.tar.bz2 |
patman: make run results better visible
For an occasional user of patman some failures are not obvious: for
instance when checkpatch reports warnings, the dry run still reports
that the email would be sent. If it is not dry run, the warnings are
shown on the screen, but it is not clear that the email was not sent.
Add some code to report failure to send email explicitly.
Tested by running the script on a patch with style violations,
observed error messages in the script output.
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/patman/patman.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/patman/patman.py b/tools/patman/patman.py index 5ab74fa..2ab6b35 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -146,13 +146,18 @@ else: # Email the patches out (giving the user time to check / cancel) cmd = '' - if ok or options.ignore_errors: + its_a_go = ok or options.ignore_errors + if its_a_go: cmd = gitutil.EmailPatches(series, cover_fname, args, options.dry_run, not options.ignore_bad_tags, cc_file, in_reply_to=options.in_reply_to) + else: + print col.Color(col.RED, "Not sending emails due to errors/warnings") # For a dry run, just show our actions as a sanity check if options.dry_run: series.ShowActions(args, cmd, options.process_tags) + if not its_a_go: + print col.Color(col.RED, "Email would not be sent") os.remove(cc_file) |