changeset 27484:0d7635dca691

mdiff: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Dec 2015 21:26:14 -0800
parents 39087ee88835
children 60183975b5bc
files mercurial/mdiff.py tests/test-check-py3-compat.t
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/mdiff.py	Mon Dec 21 21:24:49 2015 -0800
+++ b/mercurial/mdiff.py	Mon Dec 21 21:26:14 2015 -0800
@@ -5,9 +5,20 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from i18n import _
-import bdiff, mpatch, util, base85, error
-import re, struct, zlib
+from __future__ import absolute_import
+
+import re
+import struct
+import zlib
+
+from .i18n import _
+from . import (
+    base85,
+    bdiff,
+    error,
+    mpatch,
+    util,
+)
 
 def splitnewlines(text):
     '''like str.splitlines, but only split on newlines.'''
--- a/tests/test-check-py3-compat.t	Mon Dec 21 21:24:49 2015 -0800
+++ b/tests/test-check-py3-compat.t	Mon Dec 21 21:26:14 2015 -0800
@@ -117,7 +117,6 @@
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function
   mercurial/manifest.py not using absolute_import
-  mercurial/mdiff.py not using absolute_import
   mercurial/patch.py not using absolute_import
   mercurial/pvec.py not using absolute_import
   mercurial/py3kcompat.py not using absolute_import