From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34919A0558 for ; Sat, 26 Nov 2022 22:44:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CD5440A82; Sat, 26 Nov 2022 22:44:32 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 7796040041; Sat, 26 Nov 2022 22:44:29 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DD1295C0080; Sat, 26 Nov 2022 16:44:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 26 Nov 2022 16:44:28 -0500 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=fm1; t=1669499068; x= 1669585468; bh=cNRjQXWUEH8ngl9imGlgiCkvMKtFGC775lBb5YT50v4=; b=O qVskpK2hlVIxqLfAErOdl5iYyCG+uP/PgRcVos/WzXuCXlN81M71d+BJKYoFmnIx GUHFIlYwa2Q1rn/vNmbFKyP4/iwiM6H//P+KesntM/9qLy4n89yBdsxthVPNXwJS U7g+ZmUmumfFIevZRPvMZTfefl1LG3CExR4EU0Hiy9Pua/tpGs8TN2wINChYn624 +/CFkweZnKHoU/sTGi7WpS8d4bUxxoahXm6smUmPgqFYd+2ZdQZFLam2NXSfLlTP C+suiviHo7rfi71dh55xt3ahoUETBLnzxsPu474QfEinIC0tKscV3v8rFSVbWALv 2ClJnRHAzKC7dLUJBhd0w== 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=fm1; t=1669499068; x= 1669585468; bh=cNRjQXWUEH8ngl9imGlgiCkvMKtFGC775lBb5YT50v4=; b=G chpmJD65++wuWloMv/cZF5xde/9K9xvfQdvoM0sPaiiBAzT5+p6coIJQFHlXF4PC efJgBColkgAV5i7jkvsjqOuVGVfeWxmhj0hWTfUfkNNKLlsrKW0eFhnJV12B0hoM JvIU2D5npVSGgRF3VoOJ9S+ZhG8SDEVtzO20JR090EuHod1fXP3gwoByIq/Zo/bS F0dFkzIg9AbvMLEqyLI2sjIr5O7DmQikUDdusVUYB+ol0uITkwgKxO2L8hPoFGrL YLXplif4Lgd0+vQEEjgXn8BjRi5iKcP8Y3oqUXhbe+PNlhjMK5pSI2MP0jLIuA2C MEB6LklkIrXZGGnQHNiTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieejgdduheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 26 Nov 2022 16:44:27 -0500 (EST) From: Thomas Monjalon To: Christian Ehrhardt , bluca@debian.org, ktraynor@redhat.com Cc: stable@dpdk.org, dev@dpdk.org, Xueming Li Subject: Re: [dpdk-stable] [PATCH v3 2/2] devtools: fix patches missing if range newer than HEAD Date: Sat, 26 Nov 2022 22:44:26 +0100 Message-ID: <17952871.sWSEgdgrri@thomas> In-Reply-To: <20210811112207.370348-2-xuemingl@nvidia.com> References: <20210612135628.20460-1-xuemingl@nvidia.com> <20210811112207.370348-1-xuemingl@nvidia.com> <20210811112207.370348-2-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Someone to help with review of this patch please? Is there a real need? 11/08/2021 13:22, Xueming Li: > Current fix scan scripts used HEAD branch as history reference. > When users ran it in an earlier branch, few patches were scanned > due to the fixes in the range are newer and not merged to current > branch. > > This patch introduces optional argument, default to HEAD > if not specified. Checks the specified in parameter must > being merged in . > > Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug") > Cc: Thomas Monjalon > Cc: stable@dpdk.org > Cc: Christian Ehrhardt > > Signed-off-by: Xueming Li > --- > devtools/git-log-fixes.sh | 26 +++++++++++++++++++------- > 1 file changed, 19 insertions(+), 7 deletions(-) > > diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh > index 153ba5b438..dbed4b6419 100755 > --- a/devtools/git-log-fixes.sh > +++ b/devtools/git-log-fixes.sh > @@ -4,7 +4,7 @@ > > print_usage () > { > - echo "usage: $(basename $0) [-h] " > + echo "usage: $(basename $0) [-h] []" > } > > print_help () > @@ -15,6 +15,7 @@ print_help () > Find fixes to backport on previous versions. > It looks for the word "fix" in the headline or a tag "Fixes" or "Reverts". > The oldest bug origin is printed as well as partially fixed versions. > + It looks into current branch or the branch specified. > END_OF_HELP > } > > @@ -33,14 +34,23 @@ while getopts h ARG ; do > done > shift $(($OPTIND - 1)) > [ $# -ge 1 ] || usage_error 'range argument required' > -range="$*" > +range="$1" > +branch="$2" > + > +# default to current branch as history reference > +[ -n "$branch" ] || branch="HEAD" > +# get real brnach name > +refbranch=$(git rev-parse --abbrev-ref $branch) > +range_last=$(git rev-parse $range | head -n1) > +if ! git branch -a --contains $range_last | grep -q -e " $refbranch$" -e " remotes/$refbranch$"; then > + echo "range $range not included by branch $refbranch" > + exit 1 > +fi > > # get major release version of a commit > commit_version () # > { > local VER="v*.*" > - # use current branch as history reference > - local refbranch=$(git rev-parse --abbrev-ref HEAD) > local tag=$( (git tag -l "$VER" --contains $1 --sort=creatordate --merged $refbranch 2>&- || > # tag --merged option has been introduced in git 2.7.0 > # below is a fallback in case of old git version > @@ -49,9 +59,11 @@ commit_version () # > sed "s,.\+,$t," > done) | > head -n1) > - if [ -z "$tag" ] ; then > - # before -rc1 tag of release in progress > - cat VERSION | cut -d'.' -f-2 > + if [ -z "$tag" ]; then > + if [ "$branch" = 'HEAD' ]; then > + # before -rc1 tag of release in progress > + cat VERSION | cut -d'.' -f-2 > + fi > else > echo $tag | sed 's,^v,,' | sed 's,-rc.*,,' > fi >