Patchwork [6,of,7] convert: cvs use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 9, 2016, 4:25 a.m.
Message ID <922f364ac290f392b29f.1457497518@waste.org>
Download mbox | patch
Permalink /patch/13710/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 9, 2016, 4:25 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456936895 0
#      Wed Mar 02 16:41:35 2016 +0000
# Node ID 922f364ac290f392b29f20a64de509016a0f440b
# Parent  5cefb2acbc1e5eff1b68390902b11b30cfe12daa
convert: cvs use absolute_import

Patch

diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -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):
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
@@ -25,7 +25,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