commit:     ed8c6968a49e85d8da58425eb1eb946f01ab48e1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  2 16:14:42 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jun  2 16:14:42 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=ed8c6968

Support package filtering & rev info in pkgcheck2html

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 cgi-bin/get-git-file.sh | 8 +++++++-
 pkgcheck2html           | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cgi-bin/get-git-file.sh b/cgi-bin/get-git-file.sh
index e899601..ef57a72 100755
--- a/cgi-bin/get-git-file.sh
+++ b/cgi-bin/get-git-file.sh
@@ -24,6 +24,9 @@ main() {
                        include-projects)
                                projects=--projects
                                ;;
+                       pkg=*)
+                               filter_pkg="--pkg ${pkg}"
+                               ;;
                esac
                [[ ${qs} == *\;* ]] && qs=${qs#*;} || qs=
        done
@@ -64,6 +67,9 @@ main() {
                fi
        fi
 
+       local revarg=
+       [[ ${commit} != HEAD ]] && revarg="--revision ${commit}"
+
        local ct
        case "${file}" in
                *.css) ct=text/css;;
@@ -81,7 +87,7 @@ main() {
                        | PYTHONIOENCODING=utf8 python \
                        "${topdir}"/pkgcheck2html/pkgcheck2html.py ${verbose} \
                        -x "${topdir}"/pkgcheck2html/excludes.json \
-                       ${filter_maint} ${projects} -t "${ts}" -
+                       ${filter_maint} ${projects} ${filter_pkg} -t "${ts}" -
        else
                git cat-file -p "${tree[2]}"
        fi

diff --git a/pkgcheck2html b/pkgcheck2html
index a0d7dc5..4eb6fc5 160000
--- a/pkgcheck2html
+++ b/pkgcheck2html
@@ -1 +1 @@
-Subproject commit a0d7dc5e8b7d6f2c3aef16020513440851cf8b9c
+Subproject commit 4eb6fc540e0d94badb23874be411ad2df894b08f

Reply via email to