comparison tests/test-hook.t @ 44078:a973a75e92bf

py3: add Python 3 exception output to test-hook.t This is similar to, e.g., 3e9c6cef949b.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Fri, 18 Oct 2019 11:44:44 +0200
parents e20bafd65a96
children 3f1b4d1a90c3
comparison
equal deleted inserted replaced
44077:e20bafd65a96 44078:a973a75e92bf
978 SyntaxError: * (glob) 978 SyntaxError: * (glob)
979 exception from second failed import attempt: 979 exception from second failed import attempt:
980 Traceback (most recent call last): 980 Traceback (most recent call last):
981 ImportError: No module named hgext_syntaxerror 981 ImportError: No module named hgext_syntaxerror
982 Traceback (most recent call last): 982 Traceback (most recent call last):
983 HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed 983 HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed (no-py3 !)
984 mercurial.error.HookLoadError: b'preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed' (py3 !)
984 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed 985 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
985 986
986 $ echo '[hooks]' > ../a/.hg/hgrc 987 $ echo '[hooks]' > ../a/.hg/hgrc
987 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc 988 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc
988 $ hg pull ../a 989 $ hg pull ../a
1137 ImportError: No module named somebogusmodule 1138 ImportError: No module named somebogusmodule
1138 exception from second failed import attempt: 1139 exception from second failed import attempt:
1139 Traceback (most recent call last): 1140 Traceback (most recent call last):
1140 ImportError: No module named hgext_importfail 1141 ImportError: No module named hgext_importfail
1141 Traceback (most recent call last): 1142 Traceback (most recent call last):
1142 HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed 1143 HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed (no-py3 !)
1144 mercurial.error.HookLoadError: b'precommit.importfail hook is invalid: import of "importfail" failed' (py3 !)
1143 abort: precommit.importfail hook is invalid: import of "importfail" failed 1145 abort: precommit.importfail hook is invalid: import of "importfail" failed
1144 1146
1145 Issue1827: Hooks Update & Commit not completely post operation 1147 Issue1827: Hooks Update & Commit not completely post operation
1146 1148
1147 commit and update hooks should run after command completion. The largefiles 1149 commit and update hooks should run after command completion. The largefiles