This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from bda1cea git/hooks/x2go-post-receive-tag-pending: switch to using an array for process invocations. new 4ca837f git/hooks/x2go-post-receive-tag-pending: fix git rev-parse line and properly comment it. new 11eccf6 git/hooks/x2go-post-receive-tag-pending: fix new tag/branch git rev-list behavior. new 14618d0 git/hooks/x2go-post-receive-tag-pending: switch URL location to HTTPS. new 9fd00bd git/hooks/x2go-post-receive-tag-pending: quote new variable. new c0de4b7 git/hooks/x2go-post-receive-tag-pending: use more curly braces. new 45302e8 git/hooks/x2go-post-receive-tag-pending: reference actual tool location in X-Mailer header. new d7d6d9f git/hooks/x2go-post-receive-tag-pending: rework git rev-list call into something less duplicated. new 43956ee git/hooks/x2go-post-receive-tag-pending: only execute on master and release branches. The 8 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 | 65 ++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 17 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 9fd00bd1470b0d5c59e8648aac793862b4fe7f60 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 13:21:45 2020 +0100 git/hooks/x2go-post-receive-tag-pending: quote new variable. --- 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 5d9cfc3..137da6d 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -32,7 +32,7 @@ SENDMAIL="/usr/sbin/sendmail -oi -t" tempdir="$(mktemp -d)" trap "rm -rf \"${tempdir}\"" EXIT -DPKG_VERSION=$(perl -MDpkg -e 'print $Dpkg::version') +DPKG_VERSION="$(perl -MDpkg -e 'print $Dpkg::version')" case "$DPKG_VERSION" in 1.16.*) -- 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 11eccf6af8d144cd95c46a6ffb8c54e33c829083 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Mar 2 11:05:39 2020 +0100 git/hooks/x2go-post-receive-tag-pending: fix new tag/branch git rev-list behavior. Excluding anything in that call is useless, since we already do so with the git rev-parse call before and actually counter-productive, since it also excludes the branch the new refs are based on, leading to it effectively becoming a nop. --- 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 e2d2a2e..e10d611 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -123,7 +123,7 @@ while read oldrev newrev refname; do # 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=*' ) + git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' "${newrev}" ) fi # Be careful with the "git rev-parse" line. # It is supposed to filter out any commits that are already part of a (different) branch or tag, -- 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 c0de4b72f33ea9c0699dfcc8797cbcee074b3e46 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 13:22:09 2020 +0100 git/hooks/x2go-post-receive-tag-pending: use more curly braces. --- git/hooks/x2go-post-receive-tag-pending | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 137da6d..421ec3c 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -34,29 +34,29 @@ trap "rm -rf \"${tempdir}\"" EXIT DPKG_VERSION="$(perl -MDpkg -e 'print $Dpkg::version')" -case "$DPKG_VERSION" in +case "${DPKG_VERSION}" in 1.16.*) get_version() { - local rev="$1" - local c="$tempdir/${rev}.changelog" + 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' + 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" + 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' + 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" + local rev="${1}" git show ${rev}:debian/changelog 2>/dev/null \ | sed -re 's/Fixes:/Closes:/i' \ @@ -64,7 +64,7 @@ case "$DPKG_VERSION" in } get_bugs() { - local rev="$1" + local rev="${1}" git show ${rev}:debian/changelog 2>/dev/null \ | sed -re 's/Fixes:/Closes:/i' \ -- 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 4ca837fdb81ab08553b32cf6ced67a52d608faa0 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Mar 2 11:00:44 2020 +0100 git/hooks/x2go-post-receive-tag-pending: fix git rev-parse line and properly comment it. The previous specification was utterly wrong and included refs that shouldn't have been touched at all. The crucial part is that we only want that call to emit negated entries, essentially spanning any tag or branch which the new commits are not part of, in order to avoid sending duplicated mails in case of merge operations. The original call did something entirely different - it correctly excluded tags, but included the master and release branches during each individual run, which is not what we wanted. --- git/hooks/x2go-post-receive-tag-pending | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index d796e2f..e2d2a2e 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -125,7 +125,18 @@ while read oldrev newrev refname; do 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})" | \ + # Be careful with the "git rev-parse" line. + # It is supposed to filter out any commits that are already part of a (different) branch or tag, + # in order to not cause duplicated mails on merges. + # For this to work, git rev-parse spits out a list of negated tip refs (one per tag/branch), which + # are later ignored by git rev-list - including all predecessors. + # Since this script runs as a post-receive one, there's one caveat: it will execute after all + # branches have been updated, so the new ref(s) will already be incorporated as the new tips of + # their respective branches. Incidentally, this means that the pushed tip would be getting + # ignored as well, defeating the script's purpose. Hence, we'll manually filter out the negated tip + # ref of the current branch (i.e., refname) we're interested in, keeping that one (and that one + # only) in the loop. + git rev-parse --not --tags --branches | grep -v "$(git rev-parse ${refname})" | \ ${git_rev_list[@]} | \ while read rev; do d="${tempdir}/${rev}.diff" -- 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 14618d0165e662b955aee2ebedc584472fd1c76f Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 13:21:07 2020 +0100 git/hooks/x2go-post-receive-tag-pending: switch URL location to HTTPS. --- 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 e10d611..5d9cfc3 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -23,7 +23,7 @@ set -e set -u -BASEURL="http://code.x2go.org/gitweb?p=${GIT_REPO_NAME}" +BASEURL="https://code.x2go.org/gitweb?p=${GIT_REPO_NAME}" PROJECT="${SHORT_GIT_REPO_NAME}" -- 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 45302e81ec93d414f2bc0f42173164e7bdc61a59 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 13:27:46 2020 +0100 git/hooks/x2go-post-receive-tag-pending: reference actual tool location in 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 421ec3c..a7311b3 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: https://x2go.org/post-receive-tag-pending +X-Mailer: https://code.x2go.org/gitweb?p=maintenancescripts.git;a=blob;f=git/hooks/x2g... 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 d7d6d9f71645eb8190186d6ab4bed8b9085723ff Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 13:49:06 2020 +0100 git/hooks/x2go-post-receive-tag-pending: rework git rev-list call into something less duplicated. --- git/hooks/x2go-post-receive-tag-pending | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index a7311b3..cf6ac94 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -119,11 +119,13 @@ EOF while read oldrev newrev refname; do typeset -a git_rev_list - git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' "${oldrev}..${newrev}" ) + git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' ) # 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}" ) + git_rev_list+=( "${newrev}" ) + else + git_rev_list+=( "${oldrev}..${newrev}" ) fi # Be careful with the "git rev-parse" line. # It is supposed to filter out any commits that are already part of a (different) branch or tag, -- 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 43956eeee65c10877e1f0b6c2513a975fd673a1b Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 3 14:23:47 2020 +0100 git/hooks/x2go-post-receive-tag-pending: only execute on master and release branches. This should mostly restore the original behavior, including correct operation in the case of merges, which was actually broken before. --- git/hooks/x2go-post-receive-tag-pending | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index cf6ac94..ba84e25 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -118,6 +118,20 @@ EOF } while read oldrev newrev refname; do + # Only process master or release branches. + # Others will not be processed, so any commits containing a Fixes/Closes statement as part + # of all the other branches will be silently ignored. + case "${refname}" in + ("refs/heads/master") + : + ;; + ("refs/heads/release/"*) + : + ;; + (*) + continue + ;; + esac typeset -a git_rev_list git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' ) # For new branches/tags, do something special. Hopefully. @@ -138,7 +152,11 @@ while read oldrev newrev refname; do # ignored as well, defeating the script's purpose. Hence, we'll manually filter out the negated tip # ref of the current branch (i.e., refname) we're interested in, keeping that one (and that one # only) in the loop. - git rev-parse --not --tags --branches | grep -v "$(git rev-parse ${refname})" | \ + # However, since we want to ignore bug fix tags in changelog entries on all branches other than the + # master and release branches and only process them after they have been merged into master/release + # branches, we'll have to include only the latter. Merges from other branches will hence trigger + # emails the first time they are encountered. + git rev-parse --not --tags 'refs/heads/master' --branches='release/*' | grep -v "$(git rev-parse ${refname})" | \ ${git_rev_list[@]} | \ while read rev; do d="${tempdir}/${rev}.diff" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git