diff --git a/hg b/hg --- a/hg +++ b/hg @@ -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 @@ except ImportError: 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()