This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from ce1e927 git/hooks/update-script._irkerhook.py_: actually fetch the parent of the first uniquely new commit. new 326573e git/hooks/x2go-post-receive-tag-pending: merge in upstream changes. new 2dbb731 git/hooks/x2go-post-receive-tag-pending: switch to unversioned Python 3 version. new f00dc0c git/hooks/x2go-post-receive-tag-pending: update X-Mailer header. new 8b3266d git/hooks/x2go-post-receive-tag-pending: update copyright notice for myself. new b890e71 git/hooks/x2go-post-receive-tag-pending: handle new branches/tags gracefully. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: git/hooks/x2go-post-receive-tag-pending | 96 ++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 25 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 326573e2f1367641cd7d6358104c74adffe29e50 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 12:48:21 2020 +0100 git/hooks/x2go-post-receive-tag-pending: merge in upstream changes. --- git/hooks/x2go-post-receive-tag-pending | 84 ++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 2938f94..124d42c 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -1,7 +1,8 @@ #! /bin/bash # -# Copyright (c) 2009 Adeodato Simó (dato@net.com.org.es) -# Copyright (c) 2013 Mike Gabriel (mike.gabriel@das-netzwerkteam.de) +# Copyright © 2009 Adeodato Simó (dato@net.com.org.es) +# Copyright © 2013 Mike Gabriel (mike.gabriel@das-netzwerkteam.de) +# Copyright © 2013-2015 Guillem Jover <guillem@debian.org> # Copyright (c) 2015 Mihai Moldovan (ionic@ionic.de) # # This software may be used and distributed according to the terms @@ -26,9 +27,52 @@ BASEURL="http://code.x2go.org/gitweb?p=${GIT_REPO_NAME}" PROJECT="${SHORT_GIT_REPO_NAME}" +SENDMAIL="/usr/sbin/sendmail -oi -t" + tempdir="$(mktemp -d)" trap "rm -rf \"${tempdir}\"" EXIT +DPKG_VERSION=$(perl -MDpkg -e 'print $Dpkg::version') + +case "$DPKG_VERSION" in +1.16.*) + get_version() + { + local rev="$1" + local c="$tempdir/${rev}.changelog" + + git show ${rev}:debian/changelog | sed -re 's/Fixes:/Closes:/i' > "$c" 2>/dev/null + dpkg-parsechangelog -l"$c" | sed -rne 's/^Version: *//pi' + } + get_bugs() + { + local rev="$1" + local c="$tempdir/${rev}.changelog" + + git show ${rev}:debian/changelog | sed -re 's/Fixes:/Closes:/i' > "$c" 2>/dev/null + dpkg-parsechangelog -l"$c" | sed -rne 's/^Closes: *//pi' + } + ;; +*) + get_version() + { + local rev="$1" + + git show ${rev}:debian/changelog 2>/dev/null \ + | sed -re 's/Fixes:/Closes:/i' \ + | dpkg-parsechangelog -l- -SVersion + } + get_bugs() + { + local rev="$1" + + git show ${rev}:debian/changelog 2>/dev/null \ + | sed -re 's/Fixes:/Closes:/i' \ + | dpkg-parsechangelog -l- -SCloses + } + ;; +esac + function send_mail () { # send_mail bugno revno diff_file local bug="${1}" local fixed_in_version="${2}" @@ -55,7 +99,7 @@ tag #${bug} pending fixed #${bug} ${version} thanks -Hello, +Hi! X2Go issue #${bug} (src:${PROJECT}) reported by you has been fixed in X2Go Git. You can see the changelog below, and you can @@ -70,29 +114,25 @@ X2Go Git Admin (on behalf of the sender of this mail) --- EOF - cat "${diff}") | /usr/sbin/sendmail -oi -t + cat "${diff}") | ${SENDMAIL} } while read oldrev newrev refname; do - if echo "${refname}" | egrep -v "refs/tags/" >/dev/null && echo "${refname}" | egrep "refs/heads/(master|release/.*)" >/dev/null; then - git rev-parse --not | grep -v "$(git rev-parse ${refname})" | \ - git rev-list --reverse --stdin "${oldrev}..${newrev}" | \ - while read rev; do - c="${tempdir}/${rev}.changelog" - d="${tempdir}/${rev}.diff" - git show "${rev}:debian/changelog" >"${c}" 2>/dev/null - git show "${rev}" -- "debian/changelog" >"${d}" - version=$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Version: *//pi' -e 's/[0-9]+://' | cut -d"-" -f1) - bugs=$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Closes: *//pi') - for bug in ${bugs}; do - if grep -qE '^\+.*\<'"${bug}"'\>' "${d}" && - ! grep -qE '^-.*\<'"${bug}"'\>' "${d}"; then - info "Marking X2Go issue #${bug} as pending for release (${version})." - send_mail "${bug}" "${version}" "${rev}" "${d}" - fi - done + git rev-parse --not --tags --not --branches='master' --branches='release/*' | grep -v "$(git rev-parse ${refname})" | \ + git rev-list --reverse --stdin "${oldrev}..${newrev}" | \ + while read rev; do + d="${tempdir}/${rev}.diff" + git show "${rev}" -- "debian/changelog" >"${d}" + version=$(get_version "${rev}" | sed -re 's/[0-9]+://' | cut -d"-" -f1) + bugs=$(get_bugs "${rev}") + for bug in ${bugs}; do + if grep -qE '^\+.*\<'"${bug}"'\>' "${d}" && + ! grep -qE '^-.*\<'"${bug}"'\>' "${d}"; then + info "Marking X2Go issue #${bug} as pending for release (${version})." + send_mail "${bug}" "${version}" "${rev}" "${d}" + fi done - fi + done done # vi: et -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 2dbb731fda1e80005956d30955d09cad4f7dc1a1 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 12:49:08 2020 +0100 git/hooks/x2go-post-receive-tag-pending: switch to unversioned Python 3 version. --- git/hooks/x2go-post-receive-tag-pending | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 124d42c..93c4988 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -82,7 +82,7 @@ function send_mail () { # send_mail bugno revno diff_file #local from="$(git show -s --pretty='format:%cn <%ce>' "${rev}" | # perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')" local realname="$(git show -s --pretty='format:%cn' "${rev}" | - python3.6 -c 'from email.header import Header; import fileinput;[print(Header(line, "UTF-8").encode()) for line in fileinput.input()]')" + python3 -c 'from email.header import Header; import fileinput;[print(Header(line, "UTF-8").encode()) for line in fileinput.input()]')" local address="$(git show -s --pretty='format:<%ce>' "${rev}")" local from="${realname} ${address}" (cat <<EOF -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 8b3266d5194d4df0a3efd08051664a5897545017 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 12:49:38 2020 +0100 git/hooks/x2go-post-receive-tag-pending: update copyright notice for myself. --- git/hooks/x2go-post-receive-tag-pending | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 96911bf..80c4eaf 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -3,7 +3,7 @@ # Copyright © 2009 Adeodato Simó (dato@net.com.org.es) # Copyright © 2013 Mike Gabriel (mike.gabriel@das-netzwerkteam.de) # Copyright © 2013-2015 Guillem Jover <guillem@debian.org> -# Copyright (c) 2015 Mihai Moldovan (ionic@ionic.de) +# Copyright © 2015-2020 Mihai Moldovan (ionic@ionic.de) # # This software may be used and distributed according to the terms # of the MIT License, incorporated herein by reference. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit f00dc0c14d53be13dccf4e71bf11f4dbf858aa83 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 12:49:25 2020 +0100 git/hooks/x2go-post-receive-tag-pending: update X-Mailer header. --- git/hooks/x2go-post-receive-tag-pending | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 93c4988..96911bf 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -93,7 +93,7 @@ Subject: X2Go issue (in src:${PROJECT}) has been marked as pending for release Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit -X-Mailer: http://snipr.com/post-receive-tag-pending +X-Mailer: https://x2go.org/post-receive-tag-pending tag #${bug} pending fixed #${bug} ${version} -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit b890e714fd03c1cbbba67365446590906e16b10f Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 13:06:14 2020 +0100 git/hooks/x2go-post-receive-tag-pending: handle new branches/tags gracefully. Hopefully, at least. --- git/hooks/x2go-post-receive-tag-pending | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 80c4eaf..0e44ecf 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -118,8 +118,14 @@ EOF } while read oldrev newrev refname; do + git_rev_list="git rev-list --reverse --stdin '${oldrev}..${newrev}'" + # For new branches/tags, do something special. Hopefully. + typeset null_regex='^0{20,}$' + if [[ "${oldrev}" =~ ${null_regex} ]]; then + git_rev_list="git rev-list --reverse --stdin '${newrev}' --not --branches='*' --tags='*'" + fi git rev-parse --not --tags --not --branches='master' --branches='release/*' | grep -v "$(git rev-parse ${refname})" | \ - git rev-list --reverse --stdin "${oldrev}..${newrev}" | \ + ${git_rev_list} | \ while read rev; do d="${tempdir}/${rev}.diff" git show "${rev}" -- "debian/changelog" >"${d}" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git