hg: update top-level script to use modern import conventions
authorAugie Fackler <raf@durin42.com>
Tue, 22 Aug 2017 14:14:19 -0400
changeset 33896 1900381b6a6e
parent 33895 aed91971d88c
child 33897 b4294ff13392
hg: update top-level script to use modern import conventions
hg
--- a/hg	Tue Aug 22 14:13:13 2017 -0400
+++ b/hg	Tue Aug 22 14:14:19 2017 -0400
@@ -6,6 +6,7 @@
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
+from __future__ import absolute_import
 
 import os
 import sys
@@ -36,10 +37,11 @@
     sys.stderr.write("(check your install and PYTHONPATH)\n")
     sys.exit(-1)
 
-import mercurial.util
-import mercurial.dispatch
-
+from mercurial import (
+    dispatch,
+    util,
+)
 for fp in (sys.stdin, sys.stdout, sys.stderr):
-    mercurial.util.setbinary(fp)
+    util.setbinary(fp)
 
-mercurial.dispatch.run()
+dispatch.run()