Patchwork [5,of,7] convert: transport use absolute_import

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

Comments

timeless@mozdev.org - March 9, 2016, 4:25 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456936670 0
#      Wed Mar 02 16:37:50 2016 +0000
# Node ID 5cefb2acbc1e5eff1b68390902b11b30cfe12daa
# Parent  2a9a21afd35fbc2cad414078c6ec00ad0157834b
convert: transport use absolute_import

Patch

diff --git a/hgext/convert/transport.py b/hgext/convert/transport.py
--- a/hgext/convert/transport.py
+++ b/hgext/convert/transport.py
@@ -16,12 +16,18 @@ 
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import
 
-from mercurial import util
-from svn.core import SubversionException, Pool
-import svn.ra
+from mercurial import (
+    util,
+)
+
 import svn.client
 import svn.core
+import svn.ra
+
+Pool = svn.core.Pool
+SubversionException = svn.core.SubversionException
 
 # Some older versions of the Python bindings need to be
 # explicitly initialized. But what we want to do probably
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
@@ -26,7 +26,6 @@ 
   hgext/color.py not using absolute_import
   hgext/convert/__init__.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
   hgext/extdiff.py not using absolute_import
   hgext/factotum.py not using absolute_import