Mercurial > hg-stable
changeset 27506:e6d3dad71e44
context: use absolute_import
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Dec 2015 21:51:31 -0800 |
parents | 071af8d385a9 |
children | a16489f9132d |
files | mercurial/context.py tests/test-check-py3-compat.t |
diffstat | 2 files changed, 29 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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