changeset 28409:c43c5e7167a2

convert: convcmd use absolute_import
author timeless <timeless@mozdev.org>
date Wed, 02 Mar 2016 16:23:28 +0000
parents 4ac63ed377ba
children 48b04018c897
files hgext/convert/convcmd.py tests/test-check-py3-compat.t
diffstat 2 files changed, 42 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Wed Mar 02 16:13:05 2016 +0000
+++ b/hgext/convert/convcmd.py	Wed Mar 02 16:23:28 2016 +0000
@@ -4,22 +4,50 @@
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
+from __future__ import absolute_import
 
-from common import NoRepo, MissingTool, SKIPREV, mapfile
-from cvs import convert_cvs
-from darcs import darcs_source
-from git import convert_git
-from hg import mercurial_source, mercurial_sink
-from subversion import svn_source, svn_sink
-from monotone import monotone_source
-from gnuarch import gnuarch_source
-from bzr import bzr_source
-from p4 import p4_source
-import filemap
+import os
+import shlex
+import shutil
+
+from mercurial import (
+    encoding,
+    error,
+    hg,
+    util,
+)
+from mercurial.i18n import _
 
-import os, shutil, shlex
-from mercurial import hg, util, encoding, error
-from mercurial.i18n import _
+from . import (
+    bzr,
+    common,
+    cvs,
+    darcs,
+    filemap,
+    git,
+    gnuarch,
+    hg as hgconvert,
+    monotone,
+    p4,
+    subversion,
+)
+
+mapfile = common.mapfile
+MissingTool = common.MissingTool
+NoRepo = common.NoRepo
+SKIPREV = common.SKIPREV
+
+bzr_source = bzr.bzr_source
+convert_cvs = cvs.convert_cvs
+convert_git = git.convert_git
+darcs_source = darcs.darcs_source
+gnuarch_source = gnuarch.gnuarch_source
+mercurial_sink = hgconvert.mercurial_sink
+mercurial_source = hgconvert.mercurial_source
+monotone_source = monotone.monotone_source
+p4_source = p4.p4_source
+svn_sink = subversion.svn_sink
+svn_source = subversion.svn_source
 
 orig_encoding = 'ascii'
 
--- a/tests/test-check-py3-compat.t	Wed Mar 02 16:13:05 2016 +0000
+++ b/tests/test-check-py3-compat.t	Wed Mar 02 16:23:28 2016 +0000
@@ -24,7 +24,6 @@
   hgext/convert/__init__.py not using absolute_import
   hgext/convert/bzr.py not using absolute_import
   hgext/convert/common.py not using absolute_import
-  hgext/convert/convcmd.py not using absolute_import
   hgext/convert/cvs.py not using absolute_import
   hgext/convert/transport.py not using absolute_import
   hgext/eol.py not using absolute_import