diff --git a/scripts/validate-commits b/scripts/validate-commits --- a/scripts/validate-commits +++ b/scripts/validate-commits @@ -34,20 +34,24 @@ for rev in $(hg log -r "$1" -T '{node}\n hg update "$rev" cleanup - virtualenv -p "$(command -v python2)" "$venv" + python3 -m venv "$venv" source "$venv/bin/activate" pip install --upgrade pip setuptools 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"