From patchwork Thu Sep 25 19:30:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 393448 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 14A32140092 for ; Fri, 26 Sep 2014 05:46:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F8C14A020; Thu, 25 Sep 2014 21:45:59 +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 zc1G-kbvvkL2; Thu, 25 Sep 2014 21:45:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B80BD4A027; Thu, 25 Sep 2014 21:45:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED6BE4A027 for ; Thu, 25 Sep 2014 21:45:49 +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 cvLtFt5KYA+F for ; Thu, 25 Sep 2014 21:45:47 +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 na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0131.outbound.protection.outlook.com [65.55.169.131]) by theia.denx.de (Postfix) with ESMTPS id CE7504A020 for ; Thu, 25 Sep 2014 21:45:42 +0200 (CEST) Received: from snotra.buserror.net (24.118.93.161) by DM2PR0301MB0733.namprd03.prod.outlook.com (25.160.97.141) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Thu, 25 Sep 2014 19:31:02 +0000 From: Scott Wood To: , Simon Glass Date: Thu, 25 Sep 2014 14:30:46 -0500 Message-ID: <1411673446-4593-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [24.118.93.161] X-ClientProxiedBy: CO2PR11CA0021.namprd11.prod.outlook.com (10.141.242.159) To DM2PR0301MB0733.namprd03.prod.outlook.com (25.160.97.141) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0733; X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(79102003)(229853001)(20776003)(90102001)(47776003)(77982003)(107046002)(64706001)(86362001)(92566001)(46102003)(104166001)(77156001)(92726001)(97736003)(81342003)(74502003)(83072002)(80022003)(74662003)(69596002)(66066001)(81542003)(62966002)(33646002)(85852003)(88136002)(89996001)(95666004)(101416001)(85306004)(50986999)(48376002)(50466002)(31966008)(83322001)(53416004)(120916001)(87976001)(81156004)(10300001)(77096002)(105586002)(19580395003)(42186005)(106356001)(102836001)(21056001)(87286001)(19580405001)(76482002)(36756003)(50226001)(99396003)(4396001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB0733; H:snotra.buserror.net; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-OriginatorOrg: freescale.com Cc: Scott Wood Subject: [U-Boot] [PATCH] patman: Check commit_match before stripping leading whitespace 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de True commit lines start at column zero. Anything that is indented is part of the commit message instead. I noticed this by trying to run buildman with commit e3a4facdfc07179ebe017a07b8de6224a935a9f3 as master, which contained a reference to a Linux commit inside the commit message. ProcessLine saw that as a genuite commit line, and thus buildman tried to build it, and died with an exception because that SHA is not present in the U-Boot tree. Signed-off-by: Scott Wood Acked-by: Simon Glass --- tools/patman/patchstream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index d630157..68e98b9 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -139,6 +139,9 @@ class PatchStream: # Initially we have no output. Prepare the input line string out = [] line = line.rstrip('\n') + + commit_match = re_commit.match(line) if self.is_log else None + if self.is_log: if line[:4] == ' ': line = line[4:] @@ -146,7 +149,6 @@ class PatchStream: # Handle state transition and skipping blank lines series_tag_match = re_series_tag.match(line) commit_tag_match = re_commit_tag.match(line) - commit_match = re_commit.match(line) if self.is_log else None cover_cc_match = re_cover_cc.match(line) signoff_match = re_signoff.match(line) tag_match = None