From patchwork Tue Apr 18 14:07:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 126241 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A5ADD4297D; Tue, 18 Apr 2023 16:07:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9326642D0E; Tue, 18 Apr 2023 16:07:59 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 7D65342BD9; Tue, 18 Apr 2023 16:07:58 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 236985C0127; Tue, 18 Apr 2023 10:07:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 18 Apr 2023 10:07:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681826878; x= 1681913278; bh=DBjpIhlpEdO6yRSV2wjJMypp/QFJAx7cX7M/Be6rp8k=; b=o j/nHXFncIUptSBioZ6jJH6jTv5cLoVVv4xaZJL5niQNJ9pvgq/BQgLsaO5ehPB3O z9rv/VxtXNJYvbpZTatNaTu8vpYTKTzh2Qzo+fZytuRUITpP4eZncNz575wPUaGY mrzZ0Rh3NSCYaNAwOORWFKohzeSMHh1UiN4Tjbm9SUOItGGJRCsuh9CxINWYzhoY L6AtFJkW96ScxtjHLbCHct/oCK2Bey1K3btPDMuwHtJ6fWhRBX/wvFbppsKsFmnp eA8OvMYs1XM5h4UjYgCavJ9kKbkd6Pj4dBsRBHgd8LQNC+n7hfg3LUSWQycVgHw6 YPs1H9AIlw5Tt2mJjDN9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681826878; x= 1681913278; bh=DBjpIhlpEdO6yRSV2wjJMypp/QFJAx7cX7M/Be6rp8k=; b=B ghdOXdKyDc0b4ZCS8xk/xhhdxRIKHNWHrjRGeHUXNy3ZeZ6v67n0ESQpmoxUm3Kt JLGhQCsObbVqBVJPMcRzyk+3p57Wpfe1C1zvrx9nk8xHFpGkoHQuOwcuUTsUSYgJ o9vwnBswqmEOpu4hHa+4mgLUYhgAlPncMybRtHLOrBfyKdI1PN7MGD7T8KR+IWGe USxU6Muv+ntUa7T5CGl3Jl4O0dcF38VqdSC2ePAjHn1HrByny9uk2S+uCqQ06xt7 08GHi55PEjyqa2eo8A51LDUDZAyEzhYOyKmLJeFEpI9PYc0AAqHBfymtSGVI4Vhi atR3bKnQilrWTB0p4Na3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelkedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Apr 2023 10:07:57 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: stable@dpdk.org, Yuanhan Liu Subject: [PATCH 1/2] devtools: fix check of multiple commits fixed at once Date: Tue, 18 Apr 2023 16:07:25 +0200 Message-Id: <20230418140726.1472209-2-thomas@monjalon.net> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418140726.1472209-1-thomas@monjalon.net> References: <20230418140726.1472209-1-thomas@monjalon.net> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When looking for fixes to backport, only the first origin commit hash (from "Fixes:") was checked. There is very little chance that the next commits being fixed have a wrong hash in the commit log of the fix, but it is fixed by checking them all before proceeding further. Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: Luca Boccassi --- devtools/git-log-fixes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh index 8a4a8470c2..4690dd4545 100755 --- a/devtools/git-log-fixes.sh +++ b/devtools/git-log-fixes.sh @@ -68,7 +68,7 @@ origin_version () # ... { for origin in $* ; do # check hash is valid - git rev-parse -q --verify $1 >&- || continue + git rev-parse -q --verify $origin >&- || continue # get version of this bug origin local origver=$(commit_version $origin) local roothashes="$(origin_filter $origin)" From patchwork Tue Apr 18 14:07:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 126242 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 367D84297D; Tue, 18 Apr 2023 16:08:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EE0342D16; Tue, 18 Apr 2023 16:08:05 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 0212B42C24 for ; Tue, 18 Apr 2023 16:08:03 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 99B605C0117; Tue, 18 Apr 2023 10:08:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 18 Apr 2023 10:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1681826882; x= 1681913282; bh=QgyJDe8EooEBkNT0KoTdr/uL/Aqgis/rSb4DgLmmtx4=; b=s hu+Ephg/00ycs3ySg1QN8sggE1gKKLN0k25NvGLQaKCZ23WrUPfhIOK9KBqp4zSN PlZiK4J+d6H9it8tgVaMCM6gwDtN5mxOX4m/XQ7xq68dN52EJAnB55Ei3NFFyrlf /fAIFNWR2M0f3hQwNkPoi4rvsAyKxA8AMSA/PCWhvl+IfiEjgiqHbFSGvX2MN4qD nKX0na5GXqK8eeITVBHX2NVRtSo6CLayoFZiSY5xjO+Qjhb88LUzn3H41Dj2aKVw o3sxR5ZKY2ulILF+6OjcDQdShyQ7Uvh4oPHkLhLcnIjHYWLo8wm4ZvQTyjdbZl/1 jK81Z3zq8pwMWCVWvRc8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1681826882; x=1681913282; bh=Q gyJDe8EooEBkNT0KoTdr/uL/Aqgis/rSb4DgLmmtx4=; b=j6dU+LxaPzdF/1FCj zrFNaqcvXijfPj0mfO3bzxr1wEhgw5PoUzcCIFc1oXRThRLWSej+aWUXh3wR/o2O mT70NwVgdSbaA8VZbBXg5v8jJ7bGNHo8yBPbvIcMlBMofDK4m1PriVcrbrTZVJ7q IC9n4RfyNyocgM4gPGrGU0B3XisBqjtcqFisaFCLwinxPSfILl2X/yVJpbic7oRG +LkvjDfpPMxpX5nWSVQ2lZWSlmdn/LABPtWOI5x7XfYh8edbc8QJ2MPQJ0fkz1bS K+zUaCuUmxZHGwxstz8kpvnLg2Znt7dgtcq63otAWp0KFf26AJ96nwcYcZqgISkz r7KAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelkedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrd hnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 18 Apr 2023 10:08:02 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Subject: [PATCH 2/2] devtools: deduplicate function to mark fixes Date: Tue, 18 Apr 2023 16:07:26 +0200 Message-Id: <20230418140726.1472209-3-thomas@monjalon.net> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418140726.1472209-1-thomas@monjalon.net> References: <20230418140726.1472209-1-thomas@monjalon.net> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In the commit 8070d8fecb4e ("devtools: add fixes flag to commit listing") the function to mark a commit for "stable" was duplicated for "Fixes:" mark. The code is a bit smaller by using a single function for both marks. Signed-off-by: Thomas Monjalon Acked-by: Luca Boccassi --- devtools/git-log-fixes.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh index 4690dd4545..005e46f715 100755 --- a/devtools/git-log-fixes.sh +++ b/devtools/git-log-fixes.sh @@ -84,31 +84,21 @@ origin_version () # ... done | sort -uV | head -n1 } -# print a marker for stable tag presence -stable_tag () # +# print a marker for pattern presence in the commit message +git_log_mark () # { - if git log --format='%b' -1 $1 | grep -qi '^Cc: *stable@dpdk.org' ; then - echo 'S' + if git log --format='%b' -1 $1 | grep -qi "$2" ; then + echo "$3" else echo '-' fi } -# print a marker for fixes tag presence -fixes_tag () # -{ - if git log --format='%b' -1 $1 | grep -qi '^Fixes: *' ; then - echo 'F' - else - echo '-' - fi -} - git log --oneline --reverse $range | while read id headline ; do origins=$(origin_filter $id) - stable=$(stable_tag $id) - fixes=$(fixes_tag $id) + stable=$(git_log_mark $id '^Cc: *stable@dpdk.org' 'S') + fixes=$(git_log_mark $id '^Fixes:' 'F') [ "$stable" = "S" ] || [ "$fixes" = "F" ] || [ -n "$origins" ] || continue version=$(commit_version $id) if [ -n "$origins" ] ; then