diff --git a/tests/test-hook b/tests/test-hook --- a/tests/test-hook +++ b/tests/test-hook @@ -230,4 +230,22 @@ hg ci --debug -m 'change foo' | sed -e ' hg showconfig hooks | sed -e 's/ at .*>/>/' +echo '# test python hook configured with python:[file]:[hook] syntax' +cd .. +mkdir d +cd d +hg init repo +mkdir hooks + +cd hooks +cat > testhooks.py < ../repo/.hg/hgrc +echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc + +cd ../repo +hg commit + exit 0 diff --git a/tests/test-hook.out b/tests/test-hook.out --- a/tests/test-hook.out +++ b/tests/test-hook.out @@ -160,3 +160,6 @@ calling hook commit.auto: +# test python hook configured with python:[file]:[hook] syntax +hook works +nothing changed