changeset 29312:29139be0ccc7

py3: make largefiles/proto.py use absolute_import
author liscju <piotr.listkiewicz@gmail.com>
date Tue, 10 May 2016 14:41:58 +0200
parents b76abae75161
children 0ccab84f9630
files hgext/largefiles/proto.py tests/test-check-py3-compat.t
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/proto.py	Tue May 10 14:26:36 2016 +0200
+++ b/hgext/largefiles/proto.py	Tue May 10 14:41:58 2016 +0200
@@ -2,18 +2,27 @@
 #
 # 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
 import re
 
-from mercurial import error, httppeer, util, wireproto
 from mercurial.i18n import _
 
+from mercurial import (
+    error,
+    httppeer,
+    util,
+    wireproto,
+)
+
+from . import (
+    lfutil,
+)
+
 urlerr = util.urlerr
 urlreq = util.urlreq
 
-import lfutil
-
 LARGEFILES_REQUIRED_MSG = ('\nThis repository uses the largefiles extension.'
                            '\n\nPlease enable it in your Mercurial config '
                            'file.\n')
--- a/tests/test-check-py3-compat.t	Tue May 10 14:26:36 2016 +0200
+++ b/tests/test-check-py3-compat.t	Tue May 10 14:41:58 2016 +0200
@@ -10,7 +10,6 @@
   hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
   hgext/highlight/__init__.py not using absolute_import
   hgext/highlight/highlight.py not using absolute_import
-  hgext/largefiles/proto.py not using absolute_import
   hgext/largefiles/remotestore.py not using absolute_import
   hgext/largefiles/reposetup.py not using absolute_import
   hgext/largefiles/uisetup.py not using absolute_import