From patchwork Mon Oct 15 19:55:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 191656 X-Patchwork-Delegate: trini@ti.com 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 9D72D2C00A5 for ; Tue, 16 Oct 2012 06:56:19 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6AB9E4A0FE; Mon, 15 Oct 2012 21:56:16 +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 yLj5XCRM0Dro; Mon, 15 Oct 2012 21:56:16 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C64EF4A0F6; Mon, 15 Oct 2012 21:56:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0535E4A0F6 for ; Mon, 15 Oct 2012 21:56:12 +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 95SiTQh-CwFU for ; Mon, 15 Oct 2012 21:56:09 +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 smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by theia.denx.de (Postfix) with ESMTP id 4E2864A0F0 for ; Mon, 15 Oct 2012 21:56:06 +0200 (CEST) Received: from localhost.localdomain (unknown [IPv6:2a01:e35:2eb9:20:e97d:cb19:b0e:f53e]) (Authenticated sender: albert.aribaud) by smtp1-g21.free.fr (Postfix) with ESMTPSA id E5A569400CB; Mon, 15 Oct 2012 21:55:59 +0200 (CEST) From: Albert ARIBAUD To: U-Boot Date: Mon, 15 Oct 2012 21:55:50 +0200 Message-Id: <1350330950-14749-1-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350280066-23320-1-git-send-email-albert.u.boot@aribaud.net> References: <1350280066-23320-1-git-send-email-albert.u.boot@aribaud.net> Subject: [U-Boot] [PATCH v2] patman: force git log commands to not use color 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 Colored logs confuse patman when analyzing logs. Add --no-color option in git log commands in case the default config has color. Signed-off-by: Albert ARIBAUD Acked-by: Simon Glass --- Changes in v2: - fixed line longer than 80 characters tools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 59eca99..72d37a0 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout) diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 0503bac..ad280cc 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -344,7 +344,8 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, + '-n%d' % count]] stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True)