From patchwork Wed Jan 9 21:13:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 210882 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 203FA2C009A for ; Thu, 10 Jan 2013 09:11:54 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6EA884A106; Wed, 9 Jan 2013 23:11:52 +0100 (CET) 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 c7UGzkeCu-dB; Wed, 9 Jan 2013 23:11:52 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DCFF54A104; Wed, 9 Jan 2013 23:11:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E7664A104 for ; Wed, 9 Jan 2013 23:11:37 +0100 (CET) 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 dWb+5wFMG8Q9 for ; Wed, 9 Jan 2013 23:11:34 +0100 (CET) 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-wg0-f73.google.com (mail-wg0-f73.google.com [74.125.82.73]) by theia.denx.de (Postfix) with ESMTPS id 857B44A0F9 for ; Wed, 9 Jan 2013 23:11:31 +0100 (CET) Received: by mail-wg0-f73.google.com with SMTP id dt12so143765wgb.2 for ; Wed, 09 Jan 2013 14:11:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=hYN3HCein3HRuvmT5QNQyEvQ1nOyOkBWeZBl/QOQlNM=; b=dB6H2WK4lAlAoyt8pVo23UTUCggS6ohLDkh0/LkWCQjbGiuAJ/KEETh0mUG0HbRex5 syzz5mrlu2cKyXREPmbl1kZy8g8+9DaReYVgwV6mk4CTuZw4t7w3sLgYw8ob7MLra+RT iToheb1ig9zKMd2qnB05gtmgIwAn6lMsoQpWs7XziGgpFiO7NhMqIuyVfPXUxwf/PQxN Br0jfBURn57CP3U/HpwJZwcVwdU1n7MDN7GHKNO9/Mich77NPRwQ6gysjwkq1XJCKXq5 q2+y+6WIYTQju67YafoqMIki1clzOytreyjCEOO0eqduiNptHqWhDKzDwmvLAT/VWgNj 3wrw== X-Received: by 10.14.208.198 with SMTP id q46mr87023248eeo.0.1357766040543; Wed, 09 Jan 2013 13:14:00 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z44si26421435een.0.2013.01.09.13.14.00 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 09 Jan 2013 13:14:00 -0800 (PST) Received: from eskimo.mtv.corp.google.com (eskimo.mtv.corp.google.com [172.22.73.100]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id DC33A200057; Wed, 9 Jan 2013 13:13:59 -0800 (PST) Received: by eskimo.mtv.corp.google.com (Postfix, from userid 41370) id 96DB9221778; Wed, 9 Jan 2013 13:13:58 -0800 (PST) From: Vadim Bendebury To: u-boot@lists.denx.de Date: Wed, 9 Jan 2013 13:13:33 -0800 Message-Id: <1357766013-25729-1-git-send-email-vbendeb@chromium.org> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQkCagtuziZM6ITvb+rt9VoFDf/OxezvBa7Kg7OLZGDGSl7X9FOt+SUgdwAn0Q98JyZF086FnjcPzTXBL1G6y4+MP6MXV2jPk7rjIGFguo7jwZ/wpSaXWra2To0YvSEKv6cADE1DY4AIrbP1FFoOVVwiWfqzm05eGpk5xhKTDW1jkh3zxv8uXQTAVxSbFnZuHrAZRDaG Cc: Vadim Bendebury Subject: [U-Boot] [PATCH] Make patman usable outside of u-boot tree 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 To make it usable in git trees not providing a patch checker implementation, add a command line option, allowing to suippress patch check. While we are at it, sort debug options alphabetically. . unit test passes: $ ./patman -t . successfully used patman in the autotest tree to generate a patch email (with --no-check option) . successfully used patman in the u-boot tree to generate a patch email . `patman --help' now shows command line options ordered alphabetically Signed-off-by: Vadim Bendebury --- tools/patman/patman.py | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/patman/patman.py b/tools/patman/patman.py index e56dd01..6620a48 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -50,6 +50,9 @@ parser.add_option('-i', '--ignore-errors', action='store_true', help='Send patches email even if patch errors are found') parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run', default=False, help="Do a try run (create but don't email patches)") +parser.add_option('-p', '--project', default=project.DetectProject(), + help="Project name; affects default option values and " + "aliases [default: %default]") parser.add_option('-s', '--start', dest='start', type='int', default=0, help='Commit to start creating patches from (0 = HEAD)') parser.add_option('-t', '--test', action='store_true', dest='test', @@ -58,11 +61,11 @@ parser.add_option('-v', '--verbose', action='store_true', dest='verbose', default=False, help='Verbose output of errors and warnings') parser.add_option('--cc-cmd', dest='cc_cmd', type='string', action='store', default=None, help='Output cc list for patch file (used by git)') +parser.add_option('--no-check', action='store_true', dest='no_check', + default=False, + help="Don't check for patch compliance") parser.add_option('--no-tags', action='store_false', dest='process_tags', default=True, help="Don't process subject tags as aliaes") -parser.add_option('-p', '--project', default=project.DetectProject(), - help="Project name; affects default option values and " - "aliases [default: %default]") parser.usage = """patman [options] @@ -146,7 +149,10 @@ else: series.DoChecks() # Check the patches, and run them through 'git am' just to be sure - ok = checkpatch.CheckPatches(options.verbose, args) + if options.no_check: + ok = True + else: + ok = checkpatch.CheckPatches(options.verbose, args) if not gitutil.ApplyPatches(options.verbose, args, options.count + options.start): ok = False