comparison mercurial/hook.py @ 25953:d15b279ddade

hook: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 08 Aug 2015 19:24:40 -0700
parents 328739ea70c3
children 56b2bcea2529
comparison
equal deleted inserted replaced
25952:f0ad094db832 25953:d15b279ddade
3 # Copyright 2007 Matt Mackall <mpm@selenic.com> 3 # Copyright 2007 Matt Mackall <mpm@selenic.com>
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from i18n import _ 8 from __future__ import absolute_import
9 import os, sys, time 9
10 import extensions, util, demandimport, error 10 import os
11 import sys
12 import time
13
14 from .i18n import _
15 from . import (
16 demandimport,
17 error,
18 extensions,
19 util,
20 )
11 21
12 def _pythonhook(ui, repo, name, hname, funcname, args, throw): 22 def _pythonhook(ui, repo, name, hname, funcname, args, throw):
13 '''call python hook. hook is callable object, looked up as 23 '''call python hook. hook is callable object, looked up as
14 name in python module. if callable returns "true", hook 24 name in python module. if callable returns "true", hook
15 fails, else passes. if hook raises exception, treated as 25 fails, else passes. if hook raises exception, treated as