hook: use absolute_import
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 08 Aug 2015 19:24:40 -0700
changeset 25953 d15b279ddade
parent 25952 f0ad094db832
child 25954 7bbdb78d2842
hook: use absolute_import
mercurial/hook.py
--- a/mercurial/hook.py	Sat Aug 08 19:22:11 2015 -0700
+++ b/mercurial/hook.py	Sat Aug 08 19:24:40 2015 -0700
@@ -5,9 +5,19 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from i18n import _
-import os, sys, time
-import extensions, util, demandimport, error
+from __future__ import absolute_import
+
+import os
+import sys
+import time
+
+from .i18n import _
+from . import (
+    demandimport,
+    error,
+    extensions,
+    util,
+)
 
 def _pythonhook(ui, repo, name, hname, funcname, args, throw):
     '''call python hook. hook is callable object, looked up as