From patchwork Tue May 2 14:55:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9708209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5915160349 for ; Tue, 2 May 2017 14:55:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48BAD2847F for ; Tue, 2 May 2017 14:55:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B7D52848D; Tue, 2 May 2017 14:55:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B56122847F for ; Tue, 2 May 2017 14:55:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C92D6E091; Tue, 2 May 2017 14:55:55 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE70C6E091 for ; Tue, 2 May 2017 14:55:53 +0000 (UTC) Received: by mail-qk0-x232.google.com with SMTP id q1so44761385qkd.2 for ; Tue, 02 May 2017 07:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=zqHTTtlFXJz1VRFcR8yMQ74pblf7gOj4x1vRIP906Q8=; b=Va3KzdV+M60ncM+r7ZLF5drwsQ0cY8ioEs27RAUbp+QAdFkOXm78LZTadZepWFxzYX luRgmZlBJJ3b8YQxjTjkWKFoVIVz51OTWo9GFNUlhpDlOIGZF9aczQx3eTp23pGgY/fz 0zjPbotnpTd1zOTvk7pMFUYRaOE27YuojOcN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zqHTTtlFXJz1VRFcR8yMQ74pblf7gOj4x1vRIP906Q8=; b=pCaBA9yc5/MpryuQBze68D7r1KW/77OM3VGvEAcvuLUwNqgHi8B7WmYBADpeUqEIcs kLKNasSPzM3E8NlNIWhJNUnfJV+mJDv27JleQn+Dr1NbNE9/aA5V4RHQHeryAgFqV9Xq 9stjtPLf/K5uCyMUp6MwdkqoDKL+cBQzB3j1RPPorLV3uGs/jicio1FRZeMlZIJAP58j SrjBH0u2raasxVdZHaYq9bUq/wrPJ8+vTuW8MfopJQ6rwjOyobVDmjk7SJXs9YI+nkGe SkhR6EE8hbCGCt6nZyVwrkDCBQ8IHUMrmgcWtIwG8u1ZTvUi6PjNS4cuo8AETXC6OvN4 xIug== X-Gm-Message-State: AN3rC/7o+gx/6xx1UtNFB1j9Z5t+4JWLhly7jHsamN0BIn6MbR46Px2e 9oDlXx64ru3+gAZqLp2Q9g== X-Received: by 10.55.79.87 with SMTP id d84mr27868913qkb.172.1493736952888; Tue, 02 May 2017 07:55:52 -0700 (PDT) Received: from localhost.localdomain (99-45-70-16.lightspeed.rlghnc.sbcglobal.net. [99.45.70.16]) by smtp.gmail.com with ESMTPSA id r40sm4258318qkr.13.2017.05.02.07.55.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 May 2017 07:55:51 -0700 (PDT) From: Sean Paul To: intel-gfx@lists.freedesktop.org, daniel.vetter@linux.intel.com, jani.nikula@linux.intel.com Date: Tue, 2 May 2017 10:55:50 -0400 Message-Id: <20170502145550.1010-1-seanpaul@chromium.org> X-Mailer: git-send-email 2.13.0.rc1.294.g07d810a77f-goog Subject: [Intel-gfx] [maintainer-tools PATCH] dim: Add pull request tag headers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Add some standard headers to the pull request tag annotation. Signed-off-by: Sean Paul --- dim | 25 ++++++++++++++++++++++++- dim.rst | 4 ++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dim b/dim index 8937803..0d52e9d 100755 --- a/dim +++ b/dim @@ -67,6 +67,9 @@ DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello} # signature pull request template DIM_TEMPLATE_SIGNATURE=${DIM_TEMPLATE_SIGNATURE:-$HOME/.dim.template.signature} +# pull request headers template +DIM_TEMPLATE_PULL_HEADERS=${DIM_TEMPLATE_PULL_HEADERS:-$HOME/.dim.template.pullheaders} + # # Internal configuration. # @@ -1501,10 +1504,28 @@ function dim_tag_next } +function prep_pull_tag_headers +{ + local template + + if [ -r $DIM_TEMPLATE_PULL_HEADERS ]; then + while read -r m || [[ -n "$line" ]]; do + template="$template -m '$m'" + done < "$DIM_TEMPLATE_PULL_HEADERS" + else + template="-m 'UABI Changes:'" + template="$template -m 'Cross-subsystem Changes:'" + template="$template -m 'Core Changes:'" + template="$template -m 'Driver Changes:'" + fi + echo $template +} + # dim_pull_request branch upstream function dim_pull_request { local branch upstream remote repo req_file url git_url suffix tag + local tag_headers branch=${1:?$usage} upstream=${2:?$usage} @@ -1535,7 +1556,9 @@ function dim_pull_request done gitk "$branch@{upstream}" ^$upstream & - $DRY git tag -a $tag "$branch@{upstream}" + tag_headers=$(prep_pull_tag_headers) + $DRY git tag $tag_headers $tag "$branch@{upstream}" + $DRY git tag -a -f $tag $DRY git push $remote $tag prep_pull_mail $req_file $tag diff --git a/dim.rst b/dim.rst index 3dd19f9..02a7a55 100644 --- a/dim.rst +++ b/dim.rst @@ -464,6 +464,10 @@ DIM_TEMPLATE_SIGNATURE ---------------------- Path to a file containing a signature template for pull request mails. +DIM_TEMPLATE_PULL_HEADERS +------------------------- +Path to a file containing pull request headers, each on their own line. + dim_alias_ ----------------- Make **** an alias for the subcommand defined as the value. For example,