Show More
@@ -65,7 +65,7 b' def _pythonhook(ui, repo, name, hname, f' | |||||
65 | 'attempt:\n')) |
|
65 | 'attempt:\n')) | |
66 | ui.traceback(e2) |
|
66 | ui.traceback(e2) | |
67 | raise error.HookLoadError( |
|
67 | raise error.HookLoadError( | |
68 |
_('%s hook is invalid |
|
68 | _('%s hook is invalid: import of "%s" failed') % | |
69 | (hname, modname)) |
|
69 | (hname, modname)) | |
70 | sys.path = oldpaths |
|
70 | sys.path = oldpaths | |
71 | try: |
|
71 | try: | |
@@ -73,11 +73,11 b' def _pythonhook(ui, repo, name, hname, f' | |||||
73 | obj = getattr(obj, p) |
|
73 | obj = getattr(obj, p) | |
74 | except AttributeError: |
|
74 | except AttributeError: | |
75 | raise error.HookLoadError( |
|
75 | raise error.HookLoadError( | |
76 |
_('%s hook is invalid |
|
76 | _('%s hook is invalid: "%s" is not defined') | |
77 | % (hname, funcname)) |
|
77 | % (hname, funcname)) | |
78 | if not callable(obj): |
|
78 | if not callable(obj): | |
79 | raise error.HookLoadError( |
|
79 | raise error.HookLoadError( | |
80 |
_('%s hook is invalid |
|
80 | _('%s hook is invalid: "%s" is not callable') | |
81 | % (hname, funcname)) |
|
81 | % (hname, funcname)) | |
82 |
|
82 | |||
83 | ui.note(_("calling hook %s: %s\n") % (hname, funcname)) |
|
83 | ui.note(_("calling hook %s: %s\n") % (hname, funcname)) |
@@ -480,7 +480,7 b' test python hooks' | |||||
480 | $ hg pull ../a |
|
480 | $ hg pull ../a | |
481 | pulling from ../a |
|
481 | pulling from ../a | |
482 | searching for changes |
|
482 | searching for changes | |
483 |
abort: preoutgoing.uncallable hook is invalid |
|
483 | abort: preoutgoing.uncallable hook is invalid: "hooktests.uncallable" is not callable | |
484 | [255] |
|
484 | [255] | |
485 |
|
485 | |||
486 |
$ |
|
486 | $ echo '[hooks]' > ../a/.hg/hgrc | |
@@ -488,7 +488,7 b' test python hooks' | |||||
488 | $ hg pull ../a |
|
488 | $ hg pull ../a | |
489 | pulling from ../a |
|
489 | pulling from ../a | |
490 | searching for changes |
|
490 | searching for changes | |
491 |
abort: preoutgoing.nohook hook is invalid |
|
491 | abort: preoutgoing.nohook hook is invalid: "hooktests.nohook" is not defined | |
492 | [255] |
|
492 | [255] | |
493 |
|
493 | |||
494 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
494 | $ echo '[hooks]' > ../a/.hg/hgrc | |
@@ -504,7 +504,7 b' test python hooks' | |||||
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 |
|
507 | abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed | |
508 | [255] |
|
508 | [255] | |
509 |
|
509 | |||
510 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
510 | $ echo '[hooks]' > ../a/.hg/hgrc | |
@@ -512,7 +512,7 b' test python hooks' | |||||
512 | $ hg pull ../a |
|
512 | $ hg pull ../a | |
513 | pulling from ../a |
|
513 | pulling from ../a | |
514 | searching for changes |
|
514 | searching for changes | |
515 |
abort: preoutgoing.unreachable hook is invalid |
|
515 | abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed | |
516 | [255] |
|
516 | [255] | |
517 |
|
517 | |||
518 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
518 | $ echo '[hooks]' > ../a/.hg/hgrc | |
@@ -628,8 +628,8 b' make sure --traceback works on hook impo' | |||||
628 | Traceback (most recent call last): |
|
628 | Traceback (most recent call last): | |
629 | ImportError: No module named hgext_importfail |
|
629 | ImportError: No module named hgext_importfail | |
630 | Traceback (most recent call last): |
|
630 | Traceback (most recent call last): | |
631 |
HookLoadError: precommit.importfail hook is invalid |
|
631 | HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed | |
632 |
abort: precommit.importfail hook is invalid |
|
632 | abort: precommit.importfail hook is invalid: import of "importfail" failed | |
633 |
|
633 | |||
634 | Issue1827: Hooks Update & Commit not completely post operation |
|
634 | Issue1827: Hooks Update & Commit not completely post operation | |
635 |
|
635 |
General Comments 0
You need to be logged in to leave comments.
Login now