From patchwork Fri Jul 18 05:23:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 371337 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 35F15140077 for ; Fri, 18 Jul 2014 15:24:07 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B059A770D; Fri, 18 Jul 2014 07:24:04 +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 W-VtI3zyoo9d; Fri, 18 Jul 2014 07:24:04 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6135A74A1; Fri, 18 Jul 2014 07:24:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 85768A74A1 for ; Fri, 18 Jul 2014 07:23:56 +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 niBjzaVywITs for ; Fri, 18 Jul 2014 07:23:52 +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 smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id AA084A7472 for ; Fri, 18 Jul 2014 07:23:47 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s6I5NYgh026191; Fri, 18 Jul 2014 14:23:34 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili17) with ESMTP id s6I5NY316844; Fri, 18 Jul 2014 14:23:34 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s6I5NYcY017933; Fri, 18 Jul 2014 14:23:34 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s6I5NYFd017909; Fri, 18 Jul 2014 14:23:34 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id F080D2740043; Fri, 18 Jul 2014 14:23:33 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 18 Jul 2014 14:23:20 +0900 Message-Id: <1405661000-28241-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] patman: make "No recipient" checking more tolerant 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 If Series-to tag is missing, Patman exits with a message "No recipient". This is just annoying for those who had already added sendemail.to configuration. I guess many developers have [sendemail] to = u-boot@lists.denx.de in their .git/config because the 'To: u-boot@lists.denx.de' field should always be added when sending patches. That seems more reasonable rather than adding 'Series-to: u-boot@lists.denx.de' to every patch series. Patman should exit only when both Series-to tag and sendemail.to configuration are mising. Signed-off-by: Masahiro Yamada Cc: Simon Glass Acked-by: Simon Glass --- tools/patman/gitutil.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 7b75c83..65754f5 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -377,9 +377,14 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname, """ to = BuildEmailList(series.get('to'), '--to', alias, raise_on_error) if not to: - print ("No recipient, please add something like this to a commit\n" - "Series-to: Fred Bloggs ") - return + git_config_to = command.Output('git', 'config', 'sendemail.to') + if not git_config_to: + print ("No recipient.\n" + "Please add something like this to a commit\n" + "Series-to: Fred Bloggs \n" + "Or do something like this\n" + "git config sendemail.to u-boot@lists.denx.de") + return cc = BuildEmailList(series.get('cc'), '--cc', alias, raise_on_error) if self_only: to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)