From patchwork Wed Jan 13 21:39:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Kulikowski X-Patchwork-Id: 567141 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 059B01402C0 for ; Thu, 14 Jan 2016 08:42:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=LtHM7NK3; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DF9C4BCFE; Wed, 13 Jan 2016 22:42:30 +0100 (CET) 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 fRP5_GDomovg; Wed, 13 Jan 2016 22:42:29 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9B46B6214E; Wed, 13 Jan 2016 22:42:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42E706219E for ; Wed, 13 Jan 2016 22:40:08 +0100 (CET) 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 fS3MeJvt2cVo for ; Wed, 13 Jan 2016 22:40:07 +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-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by theia.denx.de (Postfix) with ESMTPS id 2A9E46214E for ; Wed, 13 Jan 2016 22:40:02 +0100 (CET) Received: by mail-lf0-f47.google.com with SMTP id 17so61985418lfz.1 for ; Wed, 13 Jan 2016 13:40:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=QhJ6hhli/SkhiGid3W9Q9n4h2dMM+l8ogO2AfFIRtvg=; b=LtHM7NK3zo8JS+K23LuMTD4yuixDaR/imeBVjgx9CK8reGf2RJgBaZw2fqZTTwDUim aNeSh68GXDnQ8vJr5dF7GarOZALacPfQYNtsFnIuHdOfVx6bimd3tDGtOUyXjgJKQbjU JPKawkXueAJJwyNRO/29sXIxkY0m3l3q1PH45WqL7wQYCSB/mOx1BuTaYgKCoCgZLaig dMVcYs2V2te4K+wyLtHzmmoBvbbI9k9TJOVt6XDzFU/himnUvLQSqbcDDuIU4ITap7iU EDSXCT5198SwjmIjQjKXk6TSIEuZXHA4ZjmWWy0BNDgaWTsDn5xUbCXHLq3O9lvDsuFk zzuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QhJ6hhli/SkhiGid3W9Q9n4h2dMM+l8ogO2AfFIRtvg=; b=bC2ZGVFM9LqEUJ30NffL4+qZ7AnG3rhYTZWQp/lzzsvsEW3gsHErrI+ffw68plLhYr WmfA52TfnRDvMK3vvWhDcoTGI5jBwj4z/zuoklON4Ck9epYuVirMD7/yU4rrgFtRWaAQ NgVay7TMA39bC5nadosDgxfqV1oH635p4wSpbrutyv9cWxHTQvnCfbPcfXqxjLClJpgc Gp8rwS8qZASj1KEMmDrA9LFkAzFvIkZgseUQCf0HFH3ZWE4+Fs0sjfwI7YZmyiiHvvtd Xk0+usUX07ZpJtys6kuaoTzezVArp7mHZvcSAPz/78uaooeC4EyWXjLXFa0nIgu8ZzWp Na7A== X-Gm-Message-State: ALoCoQmaETwzg3TRWLRyKk7hbHFtmjZ9+JUUlF8j8xR09aml2dqd/Mo/Cv7pUkq0MqvjOSi30TgJRdjlBrD2GEFnIRqsQbFmcA== X-Received: by 10.25.22.232 with SMTP id 101mr140181lfw.44.1452721202270; Wed, 13 Jan 2016 13:40:02 -0800 (PST) Received: from localhost.localdomain (095160097038.warszawa.vectranet.pl. [95.160.97.38]) by smtp.gmail.com with ESMTPSA id o3sm410983lfb.39.2016.01.13.13.40.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jan 2016 13:40:01 -0800 (PST) From: Mateusz Kulikowski To: Simon Glass Date: Wed, 13 Jan 2016 22:39:41 +0100 Message-Id: <1452721181-14240-1-git-send-email-mateusz.kulikowski@gmail.com> X-Mailer: git-send-email 2.5.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] patman: Add --thread option X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add option to create threaded series of patches. With it, it will be possible to create patch threads like this: [PATCH 0/10] Add support for time travel [PATCH 1/10] Add Flux Capacitor driver [PATCH 2/10] Add Mr. Fusion driver (...) Internally it will call git send-email with --thread option Signed-off-by: Mateusz Kulikowski --- tools/patman/gitutil.py | 6 +++++- tools/patman/patman.py | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 9e739d8..5f1b4f6 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -328,7 +328,7 @@ def BuildEmailList(in_list, tag=None, alias=None, raise_on_error=True): return result def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname, - self_only=False, alias=None, in_reply_to=None): + self_only=False, alias=None, in_reply_to=None, thread=False): """Email a patch series. Args: @@ -342,6 +342,8 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname, self_only: True to just email to yourself as a test in_reply_to: If set we'll pass this to git as --in-reply-to. Should be a message ID that this is in reply to. + thread: True to add --thread to git send-email (make + all patches reply to cover-letter or first patch in series) Returns: Git command that was/would be run @@ -400,6 +402,8 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname, cmd = ['git', 'send-email', '--annotate'] if in_reply_to: cmd.append('--in-reply-to="%s"' % in_reply_to) + if thread: + cmd.append('--thread') cmd += to cmd += cc diff --git a/tools/patman/patman.py b/tools/patman/patman.py index 6fe8fe0..57ae8f3 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -61,6 +61,8 @@ parser.add_option('--no-check', action='store_false', dest='check_patch', 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('--thread', action='store_true', dest='thread', + default=False, help='Create patches as a single thread') parser.usage += """ @@ -161,7 +163,7 @@ else: if its_a_go: cmd = gitutil.EmailPatches(series, cover_fname, args, options.dry_run, not options.ignore_bad_tags, cc_file, - in_reply_to=options.in_reply_to) + in_reply_to=options.in_reply_to, thread=options.thread) else: print col.Color(col.RED, "Not sending emails due to errors/warnings")