# HG changeset patch # User Augie Fackler # Date 1503425659 14400 # Node ID 1900381b6a6efca5ccf1b66d5ad712412333b3e4 # Parent aed91971d88c6cbffe12e43eaf4a23e96df19d27 hg: update top-level script to use modern import conventions diff -r aed91971d88c -r 1900381b6a6e 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()