[PATCH 7 of 7] convert: __init__ use absolute_import

timeless timeless at mozdev.org
Tue Mar 8 23:25:19 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1456936483 0
#      Wed Mar 02 16:34:43 2016 +0000
# Node ID e6a26aef26757ed9b9ea7cf408baf5736f3f623b
# Parent  922f364ac290f392b29f20a64de509016a0f440b
convert: __init__ use absolute_import

diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -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
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
@@ -24,7 +24,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


More information about the Mercurial-devel mailing list