# HG changeset patch # User Gregory Szorc # Date 1450763491 28800 # Node ID e6d3dad71e44452afd97ae558c1c1f02828192ca # Parent 071af8d385a948d55eda862445e7be3a32a1dc05 context: use absolute_import diff -r 071af8d385a9 -r e6d3dad71e44 mercurial/context.py --- a/mercurial/context.py Mon Dec 21 21:44:15 2015 -0800 +++ b/mercurial/context.py Mon Dec 21 21:51:31 2015 -0800 @@ -5,17 +5,37 @@ # 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 errno +import os import re +import stat -from node import nullid, nullrev, wdirid, short, hex, bin -from i18n import _ -import mdiff, error, util, scmutil, subrepo, patch, encoding, phases -import match as matchmod -import os, errno, stat -import obsolete as obsmod -import repoview -import fileset -import revlog +from .i18n import _ +from .node import ( + bin, + hex, + nullid, + nullrev, + short, + wdirid, +) +from . import ( + encoding, + error, + fileset, + match as matchmod, + mdiff, + obsolete as obsmod, + patch, + phases, + repoview, + revlog, + scmutil, + subrepo, + util, +) propertycache = util.propertycache diff -r 071af8d385a9 -r e6d3dad71e44 tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Mon Dec 21 21:44:15 2015 -0800 +++ b/tests/test-check-py3-compat.t Mon Dec 21 21:51:31 2015 -0800 @@ -100,7 +100,6 @@ i18n/polib.py not using absolute_import mercurial/cmdutil.py not using absolute_import mercurial/commands.py not using absolute_import - mercurial/context.py not using absolute_import mercurial/dispatch.py requires print_function mercurial/exchange.py not using absolute_import mercurial/httpclient/__init__.py not using absolute_import