diff --git a/mercurial/hook.py b/mercurial/hook.py index 2058e1a894f2ca6c4a971f4cdd540df8a49f91da_bWVyY3VyaWFsL2hvb2sucHk=..0c9e914029be47569f58cd39ce1f1763d2b03633_bWVyY3VyaWFsL2hvb2sucHk= 100644 --- a/mercurial/hook.py +++ b/mercurial/hook.py @@ -65,7 +65,7 @@ 'attempt:\n')) ui.traceback(e2) raise error.HookLoadError( - _('%s hook is invalid (import of "%s" failed)') % + _('%s hook is invalid: import of "%s" failed') % (hname, modname)) sys.path = oldpaths try: @@ -73,7 +73,7 @@ obj = getattr(obj, p) except AttributeError: raise error.HookLoadError( - _('%s hook is invalid ("%s" is not defined)') + _('%s hook is invalid: "%s" is not defined') % (hname, funcname)) if not callable(obj): raise error.HookLoadError( @@ -77,7 +77,7 @@ % (hname, funcname)) if not callable(obj): raise error.HookLoadError( - _('%s hook is invalid ("%s" is not callable)') + _('%s hook is invalid: "%s" is not callable') % (hname, funcname)) ui.note(_("calling hook %s: %s\n") % (hname, funcname)) diff --git a/tests/test-hook.t b/tests/test-hook.t index 2058e1a894f2ca6c4a971f4cdd540df8a49f91da_dGVzdHMvdGVzdC1ob29rLnQ=..0c9e914029be47569f58cd39ce1f1763d2b03633_dGVzdHMvdGVzdC1ob29rLnQ= 100644 --- a/tests/test-hook.t +++ b/tests/test-hook.t @@ -480,7 +480,7 @@ $ hg pull ../a pulling from ../a searching for changes - abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) + abort: preoutgoing.uncallable hook is invalid: "hooktests.uncallable" is not callable [255] $ echo '[hooks]' > ../a/.hg/hgrc @@ -488,7 +488,7 @@ $ hg pull ../a pulling from ../a searching for changes - abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) + abort: preoutgoing.nohook hook is invalid: "hooktests.nohook" is not defined [255] $ echo '[hooks]' > ../a/.hg/hgrc @@ -504,7 +504,7 @@ $ hg pull ../a pulling from ../a searching for changes - abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) + abort: preoutgoing.badmodule hook is invalid: import of "nomodule" failed [255] $ echo '[hooks]' > ../a/.hg/hgrc @@ -512,7 +512,7 @@ $ hg pull ../a pulling from ../a searching for changes - abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) + abort: preoutgoing.unreachable hook is invalid: import of "hooktests.container" failed [255] $ echo '[hooks]' > ../a/.hg/hgrc @@ -628,8 +628,8 @@ Traceback (most recent call last): ImportError: No module named hgext_importfail Traceback (most recent call last): - HookLoadError: precommit.importfail hook is invalid (import of "importfail" failed) - abort: precommit.importfail hook is invalid (import of "importfail" failed) + HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed + abort: precommit.importfail hook is invalid: import of "importfail" failed Issue1827: Hooks Update & Commit not completely post operation