[Libreoffice-commits] .: 2 commits - bin/g bin/tinbuild
Jan Holesovsky
kendy at kemper.freedesktop.org
Thu Oct 7 10:14:05 PDT 2010
bin/g | 12 ++++++++++--
bin/tinbuild | 23 ++++++++++++++++++-----
2 files changed, 28 insertions(+), 7 deletions(-)
New commits:
commit 6f3287a0e0fea010b828fbb071a3c2ebeebcaf8e
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Oct 7 19:10:43 2010 +0200
Tinbuild has to mail all the people that committed recently.
Between 2 tinderbox builds, anyone could have broken that, by a commit to any
of the repos - so spam all the recent committers if a build breakage appears.
diff --git a/bin/tinbuild b/bin/tinbuild
index 9ba7d9a..c063e44 100755
--- a/bin/tinbuild
+++ b/bin/tinbuild
@@ -20,6 +20,14 @@ usage ()
echo "-h this help"
}
+getCommitters ()
+{
+ from_date="$1"
+
+ ( git log '--pretty=tformat:%ce' --after="$from_date" ;
+ bin/g log '--pretty=tformat:%ce' --after="$from_date" ) | sort | uniq
+}
+
reportError ()
{
error_kind="$1"
@@ -32,10 +40,12 @@ reportError ()
case "$error_kind" in
owner) to_mail="$OWNER"
message="box broken" ;;
- *) if test -z "$prev_head" ; then
- to_mail=`git log '--pretty=format:%ce' -n1`
+ *) if test -z "$prev_head" -o -z "$last_success" ; then
+ # we need at least one successful build to
+ # be reliable
+ to_mail="$OWNER"
else
- to_mail=`git log '--pretty=format:%ce' ${prev_head}..HEAD`
+ to_mail=`getCommitters "$last_success"`
fi
message="last commit: $commit" ;;
esac
@@ -52,7 +62,7 @@ reportError ()
grep '\$ \.\/configure' config.log
echo
echo "$*"
- ) | mail -r "$OWNER" -s "$subject" "$to_mail"
+ ) | mail -r "$OWNER" -s "$subject" $to_mail
else
echo "$*" 1>&2
if test "$error_kind" = "owner" ; then
@@ -97,6 +107,7 @@ test $HTML_OUTPUT -eq 1 && export BUILD_HTML_OUTPUT=true
# main
good_head=""
prev_head=""
+last_success=""
while true; do
err_msg=""
@@ -109,13 +120,15 @@ while true; do
elif ! err_msg=$(./download 2>&1); then
reportError committer "download failed - error is:" $'\n' "$err_msg"
elif ! $NICE make dev-install >build.log 2>&1 ; then
- reportError committer "building failed - error is:" $'\n' $(tail -n50 build.log)
+ reportError committer "building failed - error is:" $'\n' "$(tail -n50 build.log)"
else
echo build done
prev_head=$good_head
# successful build, maybe do a smoketest/first.bas?
+
+ last_success="`date --utc --rfc-3339=seconds`"
good_head=$(git rev-parse --verify HEAD)
mv build "build-$good_head" ||
{
commit f34b619641a2deec798b4de140dd62f79b447b07
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Oct 7 19:09:54 2010 +0200
Force -1 for git log only if no other params are given.
diff --git a/bin/g b/bin/g
index 48b979e..29fa2a4 100755
--- a/bin/g
+++ b/bin/g
@@ -21,6 +21,7 @@ PAGER=
RELATIVIZE=1
PUSH_ALL=
KEEP_GOING=0
+REPORT_REPOS=1
while [ "${COMMAND:0:1}" = "-" ] ; do
case "$COMMAND" in
@@ -36,8 +37,15 @@ case "$COMMAND" in
EXTRA="-p0 --stat --apply --index --ignore-space-change --whitespace=error"
RELATIVIZE=0
;;
+ diff)
+ REPORT_REPOS=0
+ ;;
log)
- EXTRA='-1'
+ if [ "$#" = "1" ] ; then
+ EXTRA='-1'
+ else
+ REPORT_REPOS=0
+ fi
PAGER='--no-pager'
;;
diff)
@@ -150,7 +158,7 @@ for DIR in * ; do
;;
esac
- [ "$COMMAND" != 'diff' ] && echo "===== $DIR ====="
+ [ "$REPORT_REPOS" = "1" ] && echo "===== $DIR ====="
# check for changes
HEADREF=`git show-ref --head HEAD`
More information about the Libreoffice-commits
mailing list