[PATCH 05 of 17 V2] py3: make largefiles/lfcommands.py use absolute_import

liscju piotr.listkiewicz at gmail.com
Thu May 12 06:20:27 EDT 2016


# HG changeset patch
# User liscju <piotr.listkiewicz at gmail.com>
# Date 1462628686 -7200
#      Sat May 07 15:44:46 2016 +0200
# Node ID 8c947a3fa1c74e9d73c73ccdc29ac2ce0d7ece20
# Parent  c4ca1e65926ce69a55603e12db08b6b3ddfed6d3
py3: make largefiles/lfcommands.py use absolute_import

diff -r c4ca1e65926c -r 8c947a3fa1c7 hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py	Fri May 06 14:30:23 2016 +0200
+++ b/hgext/largefiles/lfcommands.py	Sat May 07 15:44:46 2016 +0200
@@ -7,20 +7,38 @@
 # GNU General Public License version 2 or any later version.
 
 '''High-level command function for lfconvert, plus the cmdtable.'''
+from __future__ import absolute_import
 
-import os, errno
+import errno
+import os
 import shutil
 
-from mercurial import util, match as match_, hg, node, context, error, \
-    cmdutil, scmutil, commands
 from mercurial.i18n import _
-from mercurial.lock import release
 
-from hgext.convert import convcmd
-from hgext.convert import filemap
+from mercurial import (
+    cmdutil,
+    commands,
+    context,
+    error,
+    hg,
+    lock,
+    match as match_,
+    node,
+    scmutil,
+    util,
+)
 
-import storeutil
-import lfutil
+from ..convert import (
+    convcmd,
+    filemap,
+)
+
+from . import (
+    lfutil,
+    storeutil,
+)
+
+release = lock.release
 
 # -- Commands ----------------------------------------------------------
 
diff -r c4ca1e65926c -r 8c947a3fa1c7 tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Fri May 06 14:30:23 2016 +0200
+++ b/tests/test-check-py3-compat.t	Sat May 07 15:44:46 2016 +0200
@@ -10,7 +10,6 @@
   hgext/hgcia.py not using absolute_import
   hgext/highlight/__init__.py not using absolute_import
   hgext/highlight/highlight.py not using absolute_import
-  hgext/largefiles/lfcommands.py not using absolute_import
   hgext/largefiles/localstore.py not using absolute_import
   hgext/largefiles/overrides.py not using absolute_import
   hgext/largefiles/proto.py not using absolute_import


More information about the Mercurial-devel mailing list