changeset 33896:1900381b6a6e

hg: update top-level script to use modern import conventions
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 14:14:19 -0400
parents aed91971d88c
children b4294ff13392
files hg
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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()