DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] minor changes in script used for backports
@ 2023-04-18 14:07 Thomas Monjalon
  2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thomas Monjalon @ 2023-04-18 14:07 UTC (permalink / raw)
  To: dev

While looking again at git-log-fixes.sh,
I've found a minor bug and a small improvement.

Thomas Monjalon (2):
  devtools: fix check of multiple commits fixed at once
  devtools: deduplicate function to mark fixes

 devtools/git-log-fixes.sh | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

-- 
2.40.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] devtools: fix check of multiple commits fixed at once
  2023-04-18 14:07 [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
@ 2023-04-18 14:07 ` Thomas Monjalon
  2023-11-28 14:15   ` Luca Boccassi
  2024-10-09  9:17   ` Kevin Traynor
  2023-04-18 14:07 ` [PATCH 2/2] devtools: deduplicate function to mark fixes Thomas Monjalon
  2023-11-28 13:23 ` [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Monjalon @ 2023-04-18 14:07 UTC (permalink / raw)
  To: dev; +Cc: stable, Yuanhan Liu

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 <thomas@monjalon.net>
---
 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 () # <origin_hash> ...
 {
 	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)"
-- 
2.40.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] devtools: deduplicate function to mark fixes
  2023-04-18 14:07 [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
  2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
@ 2023-04-18 14:07 ` Thomas Monjalon
  2023-11-28 14:14   ` Luca Boccassi
  2024-10-09  9:17   ` Kevin Traynor
  2023-11-28 13:23 ` [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Monjalon @ 2023-04-18 14:07 UTC (permalink / raw)
  To: dev

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 <thomas@monjalon.net>
---
 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 () # <origin_hash> ...
 	done | sort -uV | head -n1
 }
 
-# print a marker for stable tag presence
-stable_tag () # <hash>
+# print a marker for pattern presence in the commit message
+git_log_mark () # <hash> <pattern> <marker>
 {
-	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 () # <hash>
-{
-        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
-- 
2.40.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] minor changes in script used for backports
  2023-04-18 14:07 [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
  2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
  2023-04-18 14:07 ` [PATCH 2/2] devtools: deduplicate function to mark fixes Thomas Monjalon
@ 2023-11-28 13:23 ` Thomas Monjalon
  2024-11-30 22:04   ` Thomas Monjalon
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2023-11-28 13:23 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, ktraynor, bluca, christian.ehrhardt, Xueming Li

These patches have been forgotten.
Adding more Cc.

18/04/2023 16:07, Thomas Monjalon:
> While looking again at git-log-fixes.sh,
> I've found a minor bug and a small improvement.
> 
> Thomas Monjalon (2):
>   devtools: fix check of multiple commits fixed at once
>   devtools: deduplicate function to mark fixes




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] devtools: deduplicate function to mark fixes
  2023-04-18 14:07 ` [PATCH 2/2] devtools: deduplicate function to mark fixes Thomas Monjalon
@ 2023-11-28 14:14   ` Luca Boccassi
  2024-10-09  9:17   ` Kevin Traynor
  1 sibling, 0 replies; 9+ messages in thread
From: Luca Boccassi @ 2023-11-28 14:14 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Tue, 18 Apr 2023 at 15:08, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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 <thomas@monjalon.net>
> ---
>  devtools/git-log-fixes.sh | 22 ++++++----------------
>  1 file changed, 6 insertions(+), 16 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] devtools: fix check of multiple commits fixed at once
  2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
@ 2023-11-28 14:15   ` Luca Boccassi
  2024-10-09  9:17   ` Kevin Traynor
  1 sibling, 0 replies; 9+ messages in thread
From: Luca Boccassi @ 2023-11-28 14:15 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, stable, Yuanhan Liu

On Tue, 18 Apr 2023 at 15:08, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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 <thomas@monjalon.net>
> ---
>  devtools/git-log-fixes.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Luca Boccassi <bluca@debian.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] devtools: fix check of multiple commits fixed at once
  2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
  2023-11-28 14:15   ` Luca Boccassi
@ 2024-10-09  9:17   ` Kevin Traynor
  1 sibling, 0 replies; 9+ messages in thread
From: Kevin Traynor @ 2024-10-09  9:17 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: stable, Yuanhan Liu

On 18/04/2023 15:07, Thomas Monjalon wrote:
> 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 <thomas@monjalon.net>
> ---
>  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 () # <origin_hash> ...
>  {
>  	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)"

These still apply and working well.

Acked-by: Kevin Traynor <ktraynor@redhat.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] devtools: deduplicate function to mark fixes
  2023-04-18 14:07 ` [PATCH 2/2] devtools: deduplicate function to mark fixes Thomas Monjalon
  2023-11-28 14:14   ` Luca Boccassi
@ 2024-10-09  9:17   ` Kevin Traynor
  1 sibling, 0 replies; 9+ messages in thread
From: Kevin Traynor @ 2024-10-09  9:17 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 18/04/2023 15:07, Thomas Monjalon wrote:
> 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 <thomas@monjalon.net>
> ---
>  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 () # <origin_hash> ...
>  	done | sort -uV | head -n1
>  }
>  
> -# print a marker for stable tag presence
> -stable_tag () # <hash>
> +# print a marker for pattern presence in the commit message
> +git_log_mark () # <hash> <pattern> <marker>
>  {
> -	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 () # <hash>
> -{
> -        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

Acked-by: Kevin Traynor <ktraynor@redhat.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] minor changes in script used for backports
  2023-11-28 13:23 ` [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
@ 2024-11-30 22:04   ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2024-11-30 22:04 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, ktraynor, bluca, christian.ehrhardt, Xueming Li

28/11/2023 14:23, Thomas Monjalon:
> These patches have been forgotten.
> Adding more Cc.
> 
> 18/04/2023 16:07, Thomas Monjalon:
> > While looking again at git-log-fixes.sh,
> > I've found a minor bug and a small improvement.
> > 
> > Thomas Monjalon (2):
> >   devtools: fix check of multiple commits fixed at once
> >   devtools: deduplicate function to mark fixes

Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Kevin Traynor <ktraynor@redhat.com>

Applied



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-11-30 22:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 14:07 [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
2023-04-18 14:07 ` [PATCH 1/2] devtools: fix check of multiple commits fixed at once Thomas Monjalon
2023-11-28 14:15   ` Luca Boccassi
2024-10-09  9:17   ` Kevin Traynor
2023-04-18 14:07 ` [PATCH 2/2] devtools: deduplicate function to mark fixes Thomas Monjalon
2023-11-28 14:14   ` Luca Boccassi
2024-10-09  9:17   ` Kevin Traynor
2023-11-28 13:23 ` [PATCH 0/2] minor changes in script used for backports Thomas Monjalon
2024-11-30 22:04   ` Thomas Monjalon

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).