[PATCH 1 of 4] hook: even fewer parentheses for load errors

Siddharth Agarwal sid0 at fb.com
Fri Feb 12 22:53:48 UTC 2016


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1455305644 28800
#      Fri Feb 12 11:34:04 2016 -0800
# Node ID b1c91852db57b1647eb4adc8dde0ecae9f258158
# Parent  ae9fbc55c08713a1e509d26e574489fd992aee7a
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r b1c91852db57
hook: even fewer parentheses for load errors

Missed this one.

diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -36,7 +36,7 @@ def _pythonhook(ui, repo, name, hname, f
         d = funcname.rfind('.')
         if d == -1:
             raise error.HookLoadError(
-                _('%s hook is invalid ("%s" not in a module)')
+                _('%s hook is invalid: "%s" not in a module')
                 % (hname, funcname))
         modname = funcname[:d]
         oldpaths = sys.path
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -496,7 +496,7 @@ test python hooks
   $ hg pull ../a
   pulling from ../a
   searching for changes
-  abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module)
+  abort: preoutgoing.nomodule hook is invalid: "nomodule" not in a module
   [255]
 
   $ echo '[hooks]' > ../a/.hg/hgrc


More information about the Mercurial-devel mailing list