[dpdk-dev,v2] devtools: make commits with stable tag outstanding

Message ID 1491460421-6597-1-git-send-email-yuanhan.liu@linux.intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Yuanhan Liu April 6, 2017, 6:33 a.m. UTC
  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(-)
  

Comments

Thomas Monjalon April 6, 2017, 7:25 p.m. UTC | #1
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
  

Patch

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