Mercurial > hg
comparison tests/test-hook.t @ 28080:37b818cad146
hook: for python hook ImportErrors, add note to run with --traceback
I personally found it completely non-obvious that --traceback prints out stack
traces for failed imports.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 11 Feb 2016 22:52:23 -0800 |
parents | 0c9e914029be |
children | cedbe8723d99 |
comparison
equal
deleted
inserted
replaced
28079:0c9e914029be | 28080:37b818cad146 |
---|---|
503 $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc | 503 $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc |
504 $ hg pull ../a | 504 $ hg pull ../a |
505 pulling from ../a | 505 pulling from ../a |
506 searching for changes | 506 searching for changes |
507 abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed | 507 abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed |
508 (run with --traceback for stack trace) | |
508 [255] | 509 [255] |
509 | 510 |
510 $ echo '[hooks]' > ../a/.hg/hgrc | 511 $ echo '[hooks]' > ../a/.hg/hgrc |
511 $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc | 512 $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc |
512 $ hg pull ../a | 513 $ hg pull ../a |
513 pulling from ../a | 514 pulling from ../a |
514 searching for changes | 515 searching for changes |
515 abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed | 516 abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed |
517 (run with --traceback for stack trace) | |
516 [255] | 518 [255] |
517 | 519 |
518 $ echo '[hooks]' > ../a/.hg/hgrc | 520 $ echo '[hooks]' > ../a/.hg/hgrc |
519 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc | 521 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc |
520 $ hg pull ../a | 522 $ hg pull ../a |