From patchwork Wed Jan 9 22:01:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 210881 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 5D5DC2C00FB for ; Thu, 10 Jan 2013 09:08:41 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 723C44A112; Wed, 9 Jan 2013 23:08:38 +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 NOeKiKntD3Fx; Wed, 9 Jan 2013 23:08:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B91A04A101; Wed, 9 Jan 2013 23:08:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D95194A101 for ; Wed, 9 Jan 2013 23:08:28 +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 GAiyZSJMZZJz for ; Wed, 9 Jan 2013 23:08:25 +0100 (CET) X-Greylist: delayed 2814 seconds by postgrey-1.27 at theia; Wed, 09 Jan 2013 23:08:23 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 097064A0F9 for ; Wed, 9 Jan 2013 23:08:23 +0100 (CET) Received: by mail-wg0-f73.google.com with SMTP id dt12so143740wgb.0 for ; Wed, 09 Jan 2013 14:08:23 -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=gJfqM5+20RH9iqFXmOLUZ4g80IYu3dLBtYd8tIGG5do=; b=oiB1WkKnwMUp0d76ngJ6dDXCR0qcAxt19h5EoVjHh3JGMM6xqbahLOU7JUiJ47WSNB cqdIWL8PeDOKY2wLE87ewvEZkIaRkbH55PYt1kMkmlMeOnxWYxbiEwPjjWfAwAHOTKhJ v4XRf6Wq1sLLjVrCXOnWHfqjDY/+Gf8YbwSsAzJ60ZwNZrRRPIztlFHjrnLeZWJOo5LN EAx0hIraPZdqqcCwXvgHso6kUKdPz1rjcZjld6I7wOKetfdecJNZbbvoJKfVJH9FiKoJ 8VvPzsLYmMHGUKWmmFhUaBHY5j1nAQMQFQJkooCBwG85872/l1KN52lPzUXrAviOzI8w u0Aw== X-Received: by 10.14.179.198 with SMTP id h46mr87075955eem.4.1357768907071; Wed, 09 Jan 2013 14:01:47 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id g9si12248776eeo.1.2013.01.09.14.01.46 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 09 Jan 2013 14:01:47 -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 8EC77200057; Wed, 9 Jan 2013 14:01:46 -0800 (PST) Received: by eskimo.mtv.corp.google.com (Postfix, from userid 41370) id D8D81220E7D; Wed, 9 Jan 2013 14:01:45 -0800 (PST) From: Vadim Bendebury To: u-boot@lists.denx.de Date: Wed, 9 Jan 2013 14:01:42 -0800 Message-Id: <1357768902-16190-1-git-send-email-vbendeb@chromium.org> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQk68AHUp5SaJMof/dEKCSMA83uGcF/A2XFf2H2HQAZkIJ6LS0mZktA1K1oB1I21T/tgZbwokYBBRU4ConOkhBcoVAdNE/uY3pMX3bf5rVmEPW9YMj91ADLqVJS7VE0Jhz671+QjckIsa/F5jC6PLWpw46y8mzR6CM9BFUQV01zgKV3qaHhJF55nuVTvU25n4xOjfOJJ Cc: Vadim Bendebury Subject: [U-Boot] [PATCH] patman: Allow use 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 suppress 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