##// END OF EJS Templates
hooks: move logging of hook name to after we have found the hook...
Mads Kiilerich -
r20547:9d9f8ccf default
parent child Browse files
Show More
@@ -19,9 +19,6 b' def _pythonhook(ui, repo, name, hname, f'
19 unmodified commands (e.g. mercurial.commands.update) can
19 unmodified commands (e.g. mercurial.commands.update) can
20 be run as hooks without wrappers to convert return values.'''
20 be run as hooks without wrappers to convert return values.'''
21
21
22 ui.note(_("calling hook %s: %s\n") % (hname, funcname))
23 starttime = time.time()
24
25 obj = funcname
22 obj = funcname
26 if not util.safehasattr(obj, '__call__'):
23 if not util.safehasattr(obj, '__call__'):
27 d = funcname.rfind('.')
24 d = funcname.rfind('.')
@@ -75,6 +72,10 b' def _pythonhook(ui, repo, name, hname, f'
75 raise util.Abort(_('%s hook is invalid '
72 raise util.Abort(_('%s hook is invalid '
76 '("%s" is not callable)') %
73 '("%s" is not callable)') %
77 (hname, funcname))
74 (hname, funcname))
75
76 ui.note(_("calling hook %s: %s\n") % (hname, funcname))
77 starttime = time.time()
78
78 try:
79 try:
79 try:
80 try:
80 # redirect IO descriptors to the ui descriptors so hooks
81 # redirect IO descriptors to the ui descriptors so hooks
General Comments 0
You need to be logged in to leave comments. Login now