changeset 27361:29f50344fa83

revlog: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 12 Dec 2015 23:22:18 -0800
parents 6daa795ed32f
children c220434a3461
files mercurial/revlog.py tests/test-check-py3-compat.t
diffstat 2 files changed, 22 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat Dec 12 23:19:38 2015 -0800
+++ b/mercurial/revlog.py	Sat Dec 12 23:22:18 2015 -0800
@@ -11,12 +11,29 @@
 and O(changes) merge between branches.
 """
 
-# import stuff from node for others to import from revlog
+from __future__ import absolute_import
+
 import collections
-from node import bin, hex, nullid, nullrev
-from i18n import _
-import ancestor, mdiff, parsers, error, util, templatefilters
-import struct, zlib, errno
+import errno
+import struct
+import zlib
+
+# import stuff from node for others to import from revlog
+from .node import (
+    bin,
+    hex,
+    nullid,
+    nullrev,
+)
+from .i18n import _
+from . import (
+    ancestor,
+    error,
+    mdiff,
+    parsers,
+    templatefilters,
+    util,
+)
 
 _pack = struct.pack
 _unpack = struct.unpack
--- a/tests/test-check-py3-compat.t	Sat Dec 12 23:19:38 2015 -0800
+++ b/tests/test-check-py3-compat.t	Sat Dec 12 23:22:18 2015 -0800
@@ -122,7 +122,6 @@
   mercurial/patch.py not using absolute_import
   mercurial/pvec.py not using absolute_import
   mercurial/py3kcompat.py not using absolute_import
-  mercurial/revlog.py not using absolute_import
   mercurial/scmposix.py not using absolute_import
   mercurial/scmutil.py not using absolute_import
   mercurial/scmwindows.py not using absolute_import