changeset 27482:dde3da2246f1

scmutil: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Dec 2015 21:23:43 -0800
parents 029f02757c20
children 39087ee88835
files mercurial/scmutil.py tests/test-check-py3-compat.t
diffstat 2 files changed, 25 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Dec 21 21:21:09 2015 -0800
+++ b/mercurial/scmutil.py	Mon Dec 21 21:23:43 2015 -0800
@@ -5,17 +5,34 @@
 # 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 _
-from mercurial.node import wdirrev
-import util, error, osutil, revset, similar, encoding, phases
-import pathutil
-import match as matchmod
-import os, errno, re, glob, tempfile, shutil, stat
+from __future__ import absolute_import
+
+import errno
+import glob
+import os
+import re
+import shutil
+import stat
+import tempfile
+
+from .i18n import _
+from .node import wdirrev
+from . import (
+    encoding,
+    error,
+    match as matchmod,
+    osutil,
+    pathutil,
+    phases,
+    revset,
+    similar,
+    util,
+)
 
 if os.name == 'nt':
-    import scmwindows as scmplatform
+    from . import scmwindows as scmplatform
 else:
-    import scmposix as scmplatform
+    from . import scmposix as scmplatform
 
 systemrcpath = scmplatform.systemrcpath
 userrcpath = scmplatform.userrcpath
--- a/tests/test-check-py3-compat.t	Mon Dec 21 21:21:09 2015 -0800
+++ b/tests/test-check-py3-compat.t	Mon Dec 21 21:23:43 2015 -0800
@@ -122,7 +122,6 @@
   mercurial/pvec.py not using absolute_import
   mercurial/py3kcompat.py not using absolute_import
   mercurial/scmposix.py not using absolute_import
-  mercurial/scmutil.py not using absolute_import
   setup.py not using absolute_import
   tests/filterpyflakes.py requires print_function
   tests/generate-working-copy-states.py requires print_function