* [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding
@ 2017-02-23 2:49 Yuanhan Liu
2017-03-10 11:13 ` Thomas Monjalon
2017-04-06 6:33 ` [dpdk-dev] [PATCH v2] " Yuanhan Liu
0 siblings, 2 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-02-23 2:49 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Yuanhan Liu
So that, as a stable maintainer while picking commits to a stable release,
I could pay less attention to those have it and pay more attention to those
don't have it.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
devtools/git-log-fixes.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index d590735..af489a5 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -116,5 +116,7 @@ while read id headline ; do
else
origver='N/A'
fi
- printf '%s %7s %s (%s)\n' $version $id "$headline" "$origver"
+ stable="-"
+ git show $id | grep -qi 'Cc: .*stable@dpdk.org' && stable="S"
+ printf '%s %7s %s %s (%s)\n' $version $id $stable "$headline" "$origver"
done
--
1.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding
2017-02-23 2:49 [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding Yuanhan Liu
@ 2017-03-10 11:13 ` Thomas Monjalon
2017-04-06 6:31 ` Yuanhan Liu
2017-04-06 6:33 ` [dpdk-dev] [PATCH v2] " Yuanhan Liu
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-03-10 11:13 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: dev
2017-02-23 10:49, Yuanhan Liu:
> So that, as a stable maintainer while picking commits to a stable release,
> I could pay less attention to those have it and pay more attention to those
> don't have it.
Good idea
> + stable="-"
> + git show $id | grep -qi 'Cc: .*stable@dpdk.org' && stable="S"
Instead of git show, it is preferrable to get only the message content:
git log --format='%b' -1 $id
The regex may miss a Cc: without space, and may match a Cc in the middle
of a sentence.
I suggest this one:
grep -qi '^Cc: *stable@dpdk.org'
The script is written in the style "set -e" so it must be avoided to have
a "false" statement not catched.
It can be done in 2 ways:
1/
git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' && stable='S' || stable='-'
2/
if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then
stable='S'
else
stable='-'
endif
We can also move it in a function in order to keep only the logic in the
"main" block:
stable=$(stable_tag $id)
# print a marker for stable tag presence
stable_tag () # <hash>
{
if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then
echo 'S'
else
echo '-'
endif
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding
2017-03-10 11:13 ` Thomas Monjalon
@ 2017-04-06 6:31 ` Yuanhan Liu
0 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-04-06 6:31 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Fri, Mar 10, 2017 at 12:13:28PM +0100, Thomas Monjalon wrote:
> 2017-02-23 10:49, Yuanhan Liu:
> > So that, as a stable maintainer while picking commits to a stable release,
> > I could pay less attention to those have it and pay more attention to those
> > don't have it.
>
> Good idea
>
> > + stable="-"
> > + git show $id | grep -qi 'Cc: .*stable@dpdk.org' && stable="S"
>
> Instead of git show, it is preferrable to get only the message content:
> git log --format='%b' -1 $id
>
> The regex may miss a Cc: without space, and may match a Cc in the middle
> of a sentence.
> I suggest this one:
> grep -qi '^Cc: *stable@dpdk.org'
>
> The script is written in the style "set -e" so it must be avoided to have
> a "false" statement not catched.
> It can be done in 2 ways:
>
> 1/
> git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' && stable='S' || stable='-'
>
> 2/
> if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then
> stable='S'
> else
> stable='-'
> endif
>
> We can also move it in a function in order to keep only the logic in the
> "main" block:
> stable=$(stable_tag $id)
Looks good. Will send v2 soon.
Thanks.
--yliu
>
> # print a marker for stable tag presence
> stable_tag () # <hash>
> {
> if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then
> echo 'S'
> else
> echo '-'
> endif
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] devtools: make commits with stable tag outstanding
2017-02-23 2:49 [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding Yuanhan Liu
2017-03-10 11:13 ` Thomas Monjalon
@ 2017-04-06 6:33 ` Yuanhan Liu
2017-04-06 19:25 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Yuanhan Liu @ 2017-04-06 6:33 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Yuanhan Liu
So that, as a stable maintainer while picking commits to a stable release,
I could pay less attention to those have it and pay more attention to those
don't have it.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
v2: - introduce a function stable_tag for that
- fix regexp
---
devtools/git-log-fixes.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index d590735..359fbda 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -103,6 +103,16 @@ origin_version () # <origin_hash> ...
done | sort -uV | head -n1
}
+# print a marker for stable tag presense
+stable_tag () # <hash>
+{
+ if git log --format='%b' -1 $1 | grep -qi '^Cc: *stable@dpdk.org' ; then
+ echo 'S'
+ else
+ echo '-'
+ fi
+}
+
git log --oneline --reverse $range |
while read id headline ; do
origins=$(origin_filter $id)
@@ -116,5 +126,6 @@ while read id headline ; do
else
origver='N/A'
fi
- printf '%s %7s %s (%s)\n' $version $id "$headline" "$origver"
+ stable=$(stable_tag $id)
+ printf '%s %7s %s %s (%s)\n' $version $id $stable "$headline" "$origver"
done
--
1.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: make commits with stable tag outstanding
2017-04-06 6:33 ` [dpdk-dev] [PATCH v2] " Yuanhan Liu
@ 2017-04-06 19:25 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-04-06 19:25 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: dev
2017-04-06 14:33, Yuanhan Liu:
> So that, as a stable maintainer while picking commits to a stable release,
> I could pay less attention to those have it and pay more attention to those
> don't have it.
>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-06 19:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 2:49 [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding Yuanhan Liu
2017-03-10 11:13 ` Thomas Monjalon
2017-04-06 6:31 ` Yuanhan Liu
2017-04-06 6:33 ` [dpdk-dev] [PATCH v2] " Yuanhan Liu
2017-04-06 19:25 ` 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).