changeset 28414:4817c17a11a2

convert: __init__ use absolute_import
author timeless <timeless@mozdev.org>
date Wed, 02 Mar 2016 16:34:43 +0000
parents 6bda82107e05
children 21524ae331b7
files hgext/convert/__init__.py tests/test-check-py3-compat.t
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/__init__.py	Wed Mar 02 16:41:35 2016 +0000
+++ b/hgext/convert/__init__.py	Wed Mar 02 16:34:43 2016 +0000
@@ -7,12 +7,20 @@
 
 '''import revisions from foreign VCS repositories into Mercurial'''
 
-import convcmd
-import cvsps
-import subversion
-from mercurial import cmdutil, templatekw
+from __future__ import absolute_import
+
+from mercurial import (
+    cmdutil,
+    templatekw,
+)
 from mercurial.i18n import _
 
+from . import (
+    convcmd,
+    cvsps,
+    subversion,
+)
+
 cmdtable = {}
 command = cmdutil.command(cmdtable)
 # Note for extension authors: ONLY specify testedwith = 'internal' for
--- a/tests/test-check-py3-compat.t	Wed Mar 02 16:41:35 2016 +0000
+++ b/tests/test-check-py3-compat.t	Wed Mar 02 16:34:43 2016 +0000
@@ -21,7 +21,6 @@
   doc/hgmanpage.py not using absolute_import
   hgext/__init__.py not using absolute_import
   hgext/color.py not using absolute_import
-  hgext/convert/__init__.py not using absolute_import
   hgext/eol.py not using absolute_import
   hgext/extdiff.py not using absolute_import
   hgext/factotum.py not using absolute_import