[PATCH 3 of 3] convert: fix "stdlib import follows local import" problem in transport

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Mar 11 08:00:23 EST 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1457700944 -32400
#      Fri Mar 11 21:55:44 2016 +0900
# Node ID 32271b949dcbf8f704611fc765dedb107252a08c
# Parent  cc86ef8d2f0b7ebaf7b4de4692b8d4cfefe36f04
convert: fix "stdlib import follows local import" problem in transport

Before this patch, import-checker reports error below for importing
subversion python binding libraries.

    stdlib import "svn.*" follows local import: mercurial

diff --git a/hgext/convert/transport.py b/hgext/convert/transport.py
--- a/hgext/convert/transport.py
+++ b/hgext/convert/transport.py
@@ -18,10 +18,6 @@
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 from __future__ import absolute_import
 
-from mercurial import (
-    util,
-)
-
 import svn.client
 import svn.core
 import svn.ra
@@ -29,6 +25,10 @@ import svn.ra
 Pool = svn.core.Pool
 SubversionException = svn.core.SubversionException
 
+from mercurial import (
+    util,
+)
+
 # Some older versions of the Python bindings need to be
 # explicitly initialized. But what we want to do probably
 # won't work worth a darn against those libraries anyway!


More information about the Mercurial-devel mailing list