From patchwork Wed Sep 3 19:16:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 385624 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 37A8F1401F1 for ; Thu, 4 Sep 2014 05:24:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E74C7A76A7; Wed, 3 Sep 2014 21:24:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1OjO2oSUebDd; Wed, 3 Sep 2014 21:24:32 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4FA1CA7493; Wed, 3 Sep 2014 21:24:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8089BA7493 for ; Wed, 3 Sep 2014 21:24:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GQOjFyaKXB6v for ; Wed, 3 Sep 2014 21:24:20 +0200 (CEST) X-Greylist: delayed 428 seconds by postgrey-1.27 at theia; Wed, 03 Sep 2014 21:24:16 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by theia.denx.de (Postfix) with ESMTPS id 16133A7408 for ; Wed, 3 Sep 2014 21:24:16 +0200 (CEST) Received: by mail-pa0-f47.google.com with SMTP id hz1so18055095pad.20 for ; Wed, 03 Sep 2014 12:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=xLgEoWDLD2vDIQZZIdIj9q0oouMw+aAuWNGPxe5n2ho=; b=Qbb5++k46KtwBOlhLVcC01TFMdR/lYJoiWj1d45q0ubIZZGeH4IT/Ttxyfxca/oU/g Tlw/hyF5HsLfkdl/sb8KKxTCaHvo4vAbXu3tnKf5GE+NuhOxLAQgRgX8vZRfraQPoJjG Bx4MTa/boS6g9ijpWOKXXHFfmRJydvQu56wFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xLgEoWDLD2vDIQZZIdIj9q0oouMw+aAuWNGPxe5n2ho=; b=NkCdT3HiAC1VlqSjcV7yUASsZQo/tviLAgALdVLtwNBVHopt2HnsAYe14aXIg7ZVXi /xK3T/1yLjbBWIqZv88wLkwTT6ae0I1SD7XlYrDBjwVUlq9YQZy8z9FlV6Ryv0gqQHEa KjRhkMzpJfC/8E/EMgxvvqSZJDDmQ3z1ejv/SB3LyQXP5/J070haj3lZC5zMoOpk73bQ penb67zJTJRoF5lb8qhmxLfHaGP7l4I7/GlJQ3H6TAji0W2BiiRlgGsBe34C/pg9fdZt XierbbIjxy2I92Q++0DQsYBLLvXz8l5Vb5bBGxjvHVQEb1X8pqYUYK15QzYWvBxg6mqb opxg== X-Gm-Message-State: ALoCoQkoMXaeR34Wtnbl89WOvoC/s3A+zhygGKOeebukGlNW7O5LtTqxefXfG4RacaK9arit8bhw X-Received: by 10.70.60.197 with SMTP id j5mr18780435pdr.145.1409771821505; Wed, 03 Sep 2014 12:17:01 -0700 (PDT) Received: from eskimo.mtv.corp.google.com (eskimo.mtv.corp.google.com [172.22.64.56]) by mx.google.com with ESMTPSA id ig4sm7547241pbb.55.2014.09.03.12.17.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 12:17:00 -0700 (PDT) From: Vadim Bendebury To: u-boot@lists.denx.de Date: Wed, 3 Sep 2014 12:16:42 -0700 Message-Id: <1409771803-21683-1-git-send-email-vbendeb@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 Cc: Vadim Bendebury Subject: [U-Boot] [PATCH] patman: make run results better visible X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- tools/patman/patman.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/patman/patman.py b/tools/patman/patman.py index c60aa5a..0163ccd 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -154,13 +154,19 @@ 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 checkpatch 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)