From patchwork Tue May 2 18:27:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9708457 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 576716021C for ; Tue, 2 May 2017 18:27:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BE6A2841C for ; Tue, 2 May 2017 18:27:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E339284D2; Tue, 2 May 2017 18:27:09 +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 B016C2841C for ; Tue, 2 May 2017 18:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4362889E33; Tue, 2 May 2017 18:27:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 069B789E33 for ; Tue, 2 May 2017 18:27:06 +0000 (UTC) Received: by mail-yw0-x22e.google.com with SMTP id 203so73957679ywe.0 for ; Tue, 02 May 2017 11:27:05 -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:in-reply-to:references; bh=nX/0+Z3AkbhHPIlbRJ9YNPPx/cmELixAsYhhLvEti1A=; b=m+BmhdSYPyfNjo/BUAE02qwfCSxoGE+j0zxAHU1+lfMYls2Vx5z4lu2sJVcAad2ltW QOsAJrZLX9oDQcd7y7EUMWAYyGGK52ri+AZWJruTynBKBbomzX0IZOodwdcL74o4bIjN E/QI+Qa7hO2Gido9mwNHoVCP9F0x54Iqfd+S4= 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:in-reply-to :references; bh=nX/0+Z3AkbhHPIlbRJ9YNPPx/cmELixAsYhhLvEti1A=; b=adGKe1aE3nmaoShtfwreFQq/PiYyMx7hKo9+VrtYeR7Fj7hlZiC+6h8s989S/NgiYZ XXds9bl0wopOl/3vDUib0o6+0jMPRKR+C3/M+d8B4zHFfoIEZygDrN997l32ZJV7SXOl TiFkUCas4/585Icty5MD03AujWv7mLsHRap4v5r5JW2zAqxz87ABfO5hZt3QdtqZjT06 uw00NeC/0Oy8Q1noDlfB9LJ7XjhBM0faVZMxdXfs9/D1qfv3jYs57vgAqt1GVRtVgh+V DoH1MonGzP7ZOv/yWSxh7ZR/quDB3VDahjwSUtv2DdrLt0qjgU85Jx40bC/1RW8pBLW3 vFkQ== X-Gm-Message-State: AN3rC/4yfFCG/ewy31T85O/LhGg35V3k3v1KDxoP+78hT+XPKIeB8Lpe SxewS3xkOyBjeu9s X-Received: by 10.129.120.86 with SMTP id t83mr27860332ywc.331.1493749624886; Tue, 02 May 2017 11:27:04 -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 d6sm7887664ywc.22.2017.05.02.11.27.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 May 2017 11:27:03 -0700 (PDT) From: Sean Paul To: intel-gfx@lists.freedesktop.org, daniel.vetter@intel.com, jani.nikula@linux.intel.com Date: Tue, 2 May 2017 14:27:02 -0400 Message-Id: <20170502182702.19899-1-seanpaul@chromium.org> X-Mailer: git-send-email 2.13.0.rc1.294.g07d810a77f-goog In-Reply-To: <20170502145550.1010-1-seanpaul@chromium.org> References: <20170502145550.1010-1-seanpaul@chromium.org> Subject: [Intel-gfx] [maintainer-tools PATCH v2] 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. Changes in v2: - Tweaked the template var name s/PULL/TAG/ (Daniel) 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..e94eb0c 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} +# tag headers for pull requests +DIM_TEMPLATE_TAG_HEADERS=${DIM_TEMPLATE_TAG_HEADERS:-$HOME/.dim.template.tagheaders} + # # Internal configuration. # @@ -1501,10 +1504,28 @@ function dim_tag_next } +function prep_pull_tag_headers +{ + local template + + if [ -r $DIM_TEMPLATE_TAG_HEADERS ]; then + while read -r m || [[ -n "$line" ]]; do + template="$template -m '$m'" + done < "$DIM_TEMPLATE_TAG_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..d6438a3 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_TAG_HEADERS +------------------------- +Path to a file containing tag headers for pull requests, each on their own line. + dim_alias_ ----------------- Make **** an alias for the subcommand defined as the value. For example,