Show More
@@ -230,4 +230,22 b" hg ci --debug -m 'change foo' | sed -e '" | |||||
230 |
|
230 | |||
231 | hg showconfig hooks | sed -e 's/ at .*>/>/' |
|
231 | hg showconfig hooks | sed -e 's/ at .*>/>/' | |
232 |
|
232 | |||
|
233 | echo '# test python hook configured with python:[file]:[hook] syntax' | |||
|
234 | cd .. | |||
|
235 | mkdir d | |||
|
236 | cd d | |||
|
237 | hg init repo | |||
|
238 | mkdir hooks | |||
|
239 | ||||
|
240 | cd hooks | |||
|
241 | cat > testhooks.py <<EOF | |||
|
242 | def testhook(**args): | |||
|
243 | print 'hook works' | |||
|
244 | EOF | |||
|
245 | echo '[hooks]' > ../repo/.hg/hgrc | |||
|
246 | echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc | |||
|
247 | ||||
|
248 | cd ../repo | |||
|
249 | hg commit | |||
|
250 | ||||
233 | exit 0 |
|
251 | exit 0 |
@@ -160,3 +160,6 b' calling hook commit.auto: <function auto' | |||||
160 | Automatically installed hook |
|
160 | Automatically installed hook | |
161 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 |
|
161 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 | |
162 | hooks.commit.auto=<function autohook> |
|
162 | hooks.commit.auto=<function autohook> | |
|
163 | # test python hook configured with python:[file]:[hook] syntax | |||
|
164 | hook works | |||
|
165 | nothing changed |
General Comments 0
You need to be logged in to leave comments.
Login now