changeset 28413:6bda82107e05

convert: cvs use absolute_import
author timeless <timeless@mozdev.org>
date Wed, 02 Mar 2016 16:41:35 +0000
parents 1e03b74195d4
children 4817c17a11a2
files hgext/convert/cvs.py tests/test-check-py3-compat.t
diffstat 2 files changed, 23 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvs.py	Wed Mar 02 16:37:50 2016 +0000
+++ b/hgext/convert/cvs.py	Wed Mar 02 16:41:35 2016 +0000
@@ -4,15 +4,32 @@
 #
 # 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
 
-import os, re, socket, errno
-from cStringIO import StringIO
-from mercurial import encoding, util, error
+import cStringIO
+import errno
+import os
+import re
+import socket
+
+from mercurial import (
+    encoding,
+    error,
+    util,
+)
 from mercurial.i18n import _
 
-from common import NoRepo, commit, converter_source, checktool
-from common import makedatetimestamp
-import cvsps
+from . import (
+    common,
+    cvsps,
+)
+
+StringIO = cStringIO.StringIO
+checktool = common.checktool
+commit = common.commit
+converter_source = common.converter_source
+makedatetimestamp = common.makedatetimestamp
+NoRepo = common.NoRepo
 
 class convert_cvs(converter_source):
     def __init__(self, ui, path, revs=None):
--- a/tests/test-check-py3-compat.t	Wed Mar 02 16:37:50 2016 +0000
+++ b/tests/test-check-py3-compat.t	Wed Mar 02 16:41:35 2016 +0000
@@ -22,7 +22,6 @@
   hgext/__init__.py not using absolute_import
   hgext/color.py not using absolute_import
   hgext/convert/__init__.py not using absolute_import
-  hgext/convert/cvs.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