Mercurial > kallithea
changeset 8340:bf85e6018daa
scripts: properly check for errors in whitespacecleanup/run-all-cleanup
An error in whitespacecleanup, like a bug in isort that raises an exception,
should be treated as a problem instead of silently ignored.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sat, 07 Mar 2020 20:48:02 +0100 |
parents | 65b0d79ff293 |
children | 6c3a4c4a278e |
files | scripts/validate-commits scripts/whitespacecleanup.sh |
diffstat | 2 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/validate-commits Fri Apr 10 16:54:50 2020 +0200 +++ b/scripts/validate-commits Sat Mar 07 20:48:02 2020 +0100 @@ -40,14 +40,18 @@ pip install -e . -r dev_requirements.txt python-ldap python-pam # run-all-cleanup - scripts/run-all-cleanup - if ! hg update --check -q .; then - echo "run-all-cleanup did not give clean results!" + if ! scripts/run-all-cleanup ; then + echo "run-all-cleanup encountered errors!" result="NOK" - hg diff - hg revert -a else - result=" OK" + if ! hg update --check -q .; then + echo "run-all-cleanup did not give clean results!" + result="NOK" + hg diff + hg revert -a + else + result=" OK" + fi fi echo "$result: $rev (run-all-cleanup)" >> "$resultfile"