DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	"bluca@debian.org" <bluca@debian.org>,
	"ktraynor@redhat.com" <ktraynor@redhat.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD
Date: Mon, 9 Aug 2021 07:44:21 +0000	[thread overview]
Message-ID: <DM4PR12MB5373244AC0FB4E817C263478A1F69@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <5756416.oaEARKiDCu@thomas>



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, August 8, 2021 7:25 PM
> To: Xueming(Steven) Li <xuemingl@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Christian Ehrhardt <christian.ehrhardt@canonical.com>; bluca@debian.org;
> ktraynor@redhat.com; david.marchand@redhat.com
> Subject: Re: [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD
> 
> 30/06/2021 08:34, Xueming Li:
> > Current fix scan scripts scanned specified range in HEAD branch.
> 
> I cannot parse the above sentence.

The scripts scans patches and try to get patch version info from current branch.

> 
> > 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 HEAD branch.
> 
> You mean some patches were not scanned?

Scanned but failed to retrieve correct version info. 

> 
> >
> > This patch introduces optional <branch> argument, default to HEAD if
> > not specified. Checks the <range> specified in parameter must being
> > merged in <branch>.
> 
> Cannot parse either.
> 
> > Fixes: 752d8e097ec1 ("scripts: show fixes with release version of
> > bug")
> > Cc: Thomas Monjalon <thomas@monjalon.net>
> > Cc: stable@dpdk.org
> > Cc: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >
> > Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> [...]
> > -	echo "usage: $(basename $0) [-h] <git_range>"
> > +	echo "usage: $(basename $0) [-h] <git_range> [<branch>]"
> [...]
> > -range="$*"
> > +range="$1"
> 
> I think it breaks passing range in multiple parameters without quotes.
> But it is not really a problem.
> 
> > +branch="$2"
> > +
> > +[ -n "$branch" ] || branch="HEAD"
> > +refbranch=$(git rev-parse --abbrev-ref $branch)
> 
> Why this line is needed? A comment may help.

OK

> If $branch is not used anymore, we can overwrite it instead of introducing one more variable $refbranch.

$branch will be used in function commit_version().

>
> > +range_last=$(git log --oneline $range |head -n1|cut -d' ' -f1)
> 
> spaces missing around pipes.
> You can avoid "head" and "cut" by providing the right options to git.

Yes, rev-parse will do this efficiently.

> 
> > +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 () # <hash>
> > {
> >  	local VER="v*.*"
> >  	# use current branch as history reference
> > -	local refbranch=$(git rev-parse --abbrev-ref HEAD)
> 
> You move a line but not its comment above.
> 


  reply	other threads:[~2021-08-09  7:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12 13:56 [dpdk-dev] [PATCH 1/2] devtools: fix version pattern for fix search Xueming Li
2021-06-12 13:56 ` [dpdk-dev] [PATCH 2/2] devtools: auto detect branch to search fix patches Xueming Li
2021-06-14 14:15   ` Christian Ehrhardt
2021-06-15 10:56     ` Xueming(Steven) Li
2021-06-30  6:46       ` Xueming(Steven) Li
2021-06-14 13:56 ` [dpdk-dev] [PATCH 1/2] devtools: fix version pattern for fix search Christian Ehrhardt
2021-06-16  4:03 ` [dpdk-dev] [PATCH v1 " Xueming Li
2021-06-30  6:34   ` [dpdk-dev] [PATCH v2 " Xueming Li
2021-06-30  6:34     ` [dpdk-dev] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD Xueming Li
2021-08-08 11:24       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-08-09  7:44         ` Xueming(Steven) Li [this message]
2021-08-08 11:14     ` [dpdk-dev] [dpdk-stable] [PATCH v2 1/2] devtools: fix version pattern for fix search Thomas Monjalon
2021-08-09  3:32       ` Xueming(Steven) Li
2021-06-16  4:03 ` [dpdk-dev] [PATCH v1 2/2] devtools: auto detect branch to search fix patches Xueming Li
2021-08-11 11:22 ` [dpdk-dev] [PATCH v3 1/2] devtools: fix version pattern for fix search Xueming Li
2021-08-11 11:22   ` [dpdk-dev] [PATCH v3 2/2] devtools: fix patches missing if range newer than HEAD Xueming Li
2022-11-26 21:44     ` [dpdk-stable] " Thomas Monjalon
2024-08-15 16:32       ` Stephen Hemminger
2024-08-21 13:51         ` Xueming Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR12MB5373244AC0FB4E817C263478A1F69@DM4PR12MB5373.namprd12.prod.outlook.com \
    --to=xuemingl@nvidia.com \
    --cc=bluca@debian.org \
    --cc=christian.ehrhardt@canonical.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).