scmutil: use absolute_import
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 21 Dec 2015 21:23:43 -0800
changeset 27482 dde3da2246f1
parent 27481 029f02757c20
child 27483 39087ee88835
scmutil: use absolute_import
mercurial/scmutil.py
tests/test-check-py3-compat.t
--- 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