From patchwork Thu Sep 4 17:45:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 385965 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 CBC3914017F for ; Fri, 5 Sep 2014 03:45:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 13108A771C; Thu, 4 Sep 2014 19:45:51 +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 8n1BGKbERQH9; Thu, 4 Sep 2014 19:45:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4BF11A73F8; Thu, 4 Sep 2014 19:45:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0935A73F8 for ; Thu, 4 Sep 2014 19:45:44 +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 dQ5ni78C-JMw for ; Thu, 4 Sep 2014 19:45:41 +0200 (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-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by theia.denx.de (Postfix) with ESMTPS id 76A11A73F0 for ; Thu, 4 Sep 2014 19:45:38 +0200 (CEST) Received: by mail-pa0-f50.google.com with SMTP id kq14so20488906pab.37 for ; Thu, 04 Sep 2014 10:45:34 -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:in-reply-to:references; bh=j8VUfYbnSQ0DNgdNy6gZKIqRiFuInPzYLZZB9ku/4jA=; b=H60LD3hMN+oAYlh67J6Z3LKa5Dmvrdx/jwyjgrbq9PChHdUSGKY/H2YrgMdlJ5WfL1 XrlGyUGYTIykqz+iohkd/k3k81eFddSCFIol3QGLvGfftx5ewYoid5smOqjceMnNj0Y1 uEFnCxbfS1FANbdTxcpnEZzgfzLFoqBx2U5B0= 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:in-reply-to :references; bh=j8VUfYbnSQ0DNgdNy6gZKIqRiFuInPzYLZZB9ku/4jA=; b=V+Vpnw5p5sMG3lA9yPhpDl1Ks9TO0n+x+ZSN718marmEe48D2i3nBETDm2CUH3M4/e VP9SS36kSEzpdGopNFv/voL72xtSAtYDYL+HUPR5xzGzKdCmsuSq9+6Kq7acJII0j6cA omBUD8oQlB6/Wj0AGxMey3+T1puUD+Xgxd+qa/mHeuMUS2nSLfGtAtO9LPc2RK8aAFny uaTQ2qdDPWEusWrFAkcYFaz2n8gd+hHjEgbsGYtkFINFM87jid+TmKQby5YihnW1KhjX K3ccpu+QjH5YebMAK7/ujzoizbURwZR20k37G048E+YTB7lFng/VmTkvpJ1jqdyRxstw 94Kg== X-Gm-Message-State: ALoCoQlKQodiM6h/8uRiAyTWec0NjBugOm9A0iNXeGNR2DVRL5JMIbU9x7uL8MNn9Sff1XBTJEz7 X-Received: by 10.70.36.162 with SMTP id r2mr11061437pdj.97.1409852732883; Thu, 04 Sep 2014 10:45:32 -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 fh10sm2200509pdb.71.2014.09.04.10.45.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Sep 2014 10:45:31 -0700 (PDT) From: Vadim Bendebury To: u-boot@lists.denx.de Date: Thu, 4 Sep 2014 10:45:13 -0700 Message-Id: <1409852713-17291-1-git-send-email-vbendeb@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1409771803-21683-1-git-send-email-vbendeb@chromium.org> References: <1409771803-21683-1-git-send-email-vbendeb@chromium.org> Cc: Vadim Bendebury Subject: [U-Boot] [PATCH v2] 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 Reviewed-by: Doug Anderson Acked-by: Simon Glass --- 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)