[PATCH 02 of 16 V3] py3: make largefiles/__init__.py use absolute_import

liscju piotr.listkiewicz at gmail.com
Sat Jun 4 11:23:28 EDT 2016


# HG changeset patch
# User liscju <piotr.listkiewicz at gmail.com>
# Date 1462537712 -7200
#      Fri May 06 14:28:32 2016 +0200
# Node ID 8df452a3387dfd47f901665b34b19d1a11cabe7d
# Parent  b37877a19b851acd4a598f8b8214593651bd9089
py3: make largefiles/__init__.py use absolute_import

diff --git a/hgext/largefiles/__init__.py b/hgext/largefiles/__init__.py
--- a/hgext/largefiles/__init__.py
+++ b/hgext/largefiles/__init__.py
@@ -104,14 +104,20 @@ largefile. To add the first largefile to
 explicitly do so with the --large flag passed to the :hg:`add`
 command.
 '''
-
-from mercurial import hg, localrepo
+from __future__ import absolute_import
 
-import lfcommands
-import proto
-import reposetup
-import uisetup as uisetupmod
-import overrides
+from mercurial import (
+    hg,
+    localrepo,
+)
+
+from . import (
+    lfcommands,
+    overrides,
+    proto,
+    reposetup,
+    uisetup as uisetupmod,
+)
 
 # Note for extension authors: ONLY specify testedwith = 'internal' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
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
@@ -9,7 +9,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/__init__.py not using absolute_import
   hgext/largefiles/basestore.py not using absolute_import
   hgext/largefiles/lfcommands.py not using absolute_import
   hgext/largefiles/lfutil.py not using absolute_import


More information about the Mercurial-devel mailing list