[U-Boot] [PATCH v2] 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 --- Changes in v2: - modified the error message for accuracy tools/patman/patman.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/patman/patman.py b/tools/patman/patman.py index c60aa5a..86e8e63 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -154,13 +154,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) -- 2.1.0.rc2.206.gedb03e5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] patman: make run results better visible
Vadim, On Thu, Sep 4, 2014 at 10:45 AM, Vadim Bendebury wrote: > 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 > --- > > Changes in v2: > - modified the error message for accuracy > > tools/patman/patman.py | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Doug Anderson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] patman: make run results better visible
On 4 September 2014 12:57, Doug Anderson wrote: > Vadim, > > On Thu, Sep 4, 2014 at 10:45 AM, Vadim Bendebury > wrote: > > 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 > > --- > > > > Changes in v2: > > - modified the error message for accuracy > > > > tools/patman/patman.py | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > Reviewed-by: Doug Anderson > Acked-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] patman: make run results better visible
Applied to u-boot-x86/buildman, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot