From patchwork Sun Mar 17 20:31:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 228330 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 5E0122C00AD for ; Mon, 18 Mar 2013 08:40:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AF41B4A02D; Sun, 17 Mar 2013 22:40:12 +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 hnVBG36AvCQ1; Sun, 17 Mar 2013 22:40:12 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D638E4A030; Sun, 17 Mar 2013 22:40:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 480314A030 for ; Sun, 17 Mar 2013 22:40:07 +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 L3H81dFCVCpZ for ; Sun, 17 Mar 2013 22:40:03 +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-ve0-f202.google.com (mail-ve0-f202.google.com [209.85.128.202]) by theia.denx.de (Postfix) with ESMTPS id B02F94A02D for ; Sun, 17 Mar 2013 22:39:59 +0100 (CET) Received: by mail-ve0-f202.google.com with SMTP id m1so516549ves.1 for ; Sun, 17 Mar 2013 14:39:57 -0700 (PDT) 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:in-reply-to :references:x-gm-message-state; bh=g69JlgLmx2ltJ9q9+aJXeVVuUOeleYCuIy5Uw/3vN3I=; b=hvxksXjzLCnNqukzha9LxTUgF5mJs53IpOoBQljcmUcIEt+bP/YOuXAKX/M/Zp8IsS dBfasapFC17zhyT4SQFVwWP+a7dCIEQvaiWdp/+9pB26DJrOuktx8Pftq9UbSwmoXzCo YigWky8zFSHHohvsWn/IMH+XQ+7Fke/4+iKSs0bUJcjGMLL+MTJKFUUq2dhYTwY1LOWe 1XwrImnkdfrbBzXfdyBd/iGEcFfebCuCfLUzZWZI0RDCFo5Uht1zN9FAkL1ES+7K7r1O olUlguCDfWTXRXcNmpnPA8970A0e+0hMypgfVTS7StLy14YlZd1x79DATiLhYa8aAgr/ 9VGw== X-Received: by 10.58.163.168 with SMTP id yj8mr11393995veb.31.1363552299068; Sun, 17 Mar 2013 13:31:39 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id f64si1656430yhj.7.2013.03.17.13.31.39 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Sun, 17 Mar 2013 13:31:39 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.73.80]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id D26845A4203; Sun, 17 Mar 2013 13:31:38 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 7789A80677; Sun, 17 Mar 2013 13:31:38 -0700 (PDT) From: Doug Anderson To: Simon Glass Date: Sun, 17 Mar 2013 13:31:04 -0700 Message-Id: <1363552264-17348-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1363389935-23721-1-git-send-email-dianders@chromium.org> References: <1363389935-23721-1-git-send-email-dianders@chromium.org> X-Gm-Message-State: ALoCoQkyv2UcuLvGx56TBRDj1y5fieoj7v6n4xynslWBBWemWDYSjvpLx8JtCb0IvkFyU0Bc+PFO4n3dVMVlBnjyOzjiRjW6s/vH71OZ1QmeXZymp9/L01vay5Nr82jwVXa15DU9Iu2FAakKokO+CFM0zSsLVnby91sJkH6kBXa53tpXN6BTQTAJCd6wUIYCa8/1ZoVOwZeR Cc: Tom Rini , u-boot@lists.denx.de, Otavio Salvador Subject: [U-Boot] [PATCH v2] patman: Allow specifying the message ID your series is in reply to 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 Some versions of git don't seem to prompt you for the message ID that your series is in reply to. Allow specifying this from the command line. Signed-off-by: Doug Anderson Acked-by: Simon Glass --- Changes in v2: - Adjusted docstring wording as per Otavio Salvador. tools/patman/gitutil.py | 7 ++++++- tools/patman/patman.py | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index ca3ba4a..c35d209 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -203,7 +203,7 @@ def BuildEmailList(in_list, tag=None, alias=None): return result def EmailPatches(series, cover_fname, args, dry_run, cc_fname, - self_only=False, alias=None): + self_only=False, alias=None, in_reply_to=None): """Email a patch series. Args: @@ -213,6 +213,8 @@ def EmailPatches(series, cover_fname, args, dry_run, cc_fname, dry_run: Just return the command that would be run cc_fname: Filename of Cc file for per-commit Cc 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. Returns: Git command that was/would be run @@ -262,6 +264,9 @@ def EmailPatches(series, cover_fname, args, dry_run, cc_fname, to = BuildEmailList([os.getenv('USER')], '--to', alias) cc = [] cmd = ['git', 'send-email', '--annotate'] + if in_reply_to: + cmd.append('--in-reply-to="%s"' % in_reply_to) + cmd += to cmd += cc cmd += ['--cc-cmd', '"%s --cc-cmd %s"' % (sys.argv[0], cc_fname)] diff --git a/tools/patman/patman.py b/tools/patman/patman.py index e049081..377408d 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -53,6 +53,8 @@ parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run', parser.add_option('-p', '--project', default=project.DetectProject(), help="Project name; affects default option values and " "aliases [default: %default]") +parser.add_option('-r', '--in-reply-to', type='string', action='store', + help="Message ID that this series is in reply to") 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', @@ -163,7 +165,7 @@ else: cmd = '' if ok or options.ignore_errors: cmd = gitutil.EmailPatches(series, cover_fname, args, - options.dry_run, cc_file) + options.dry_run, cc_file, in_reply_to=options.in_reply_to) # For a dry run, just show our actions as a sanity check if options.dry_run: