Patchwork [5,of,8] scmposix: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 22, 2015, 6 a.m.
Message ID <bffeaac6cbadeac32bba.1450764040@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/12227/
State Accepted
Headers show

Comments

Gregory Szorc - Dec. 22, 2015, 6 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1450761889 28800
#      Mon Dec 21 21:24:49 2015 -0800
# Node ID bffeaac6cbadeac32bba50347f9f8ab07de96e38
# Parent  3db5977bb6e7548853264af69d958795c7797a82
scmposix: use absolute_import

Patch

diff --git a/mercurial/scmposix.py b/mercurial/scmposix.py
--- a/mercurial/scmposix.py
+++ b/mercurial/scmposix.py
@@ -1,10 +1,16 @@ 
-import sys, os
-import osutil
+from __future__ import absolute_import
+
+import os
+import sys
+
+from . import (
+    osutil,
+)
 
 def _rcfiles(path):
     rcs = [os.path.join(path, 'hgrc')]
     rcdir = os.path.join(path, 'hgrc.d')
     try:
         rcs.extend([os.path.join(rcdir, f)
                     for f, kind in osutil.listdir(rcdir)
                     if f.endswith(".rc")])
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -116,17 +116,16 @@ 
   mercurial/lsprofcalltree.py not using absolute_import
   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
-  mercurial/scmposix.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
   tests/get-with-headers.py requires print_function
   tests/heredoctest.py requires print_function
   tests/hypothesishelpers.py not using absolute_import
   tests/hypothesishelpers.py requires print_function
   tests/killdaemons.py not using absolute_import