localrepo: use absolute_import
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 23 Dec 2015 12:30:14 -0800
changeset 27522 798535853345
parent 27521 b1adf32b0605
child 27523 68b9abf1cb82
localrepo: use absolute_import
mercurial/localrepo.py
tests/test-check-py3-compat.t
--- a/mercurial/localrepo.py	Mon Dec 21 21:52:58 2015 -0800
+++ b/mercurial/localrepo.py	Wed Dec 23 12:30:14 2015 -0800
@@ -4,21 +4,60 @@
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
-from node import hex, nullid, wdirrev, short
-from i18n import _
+
+from __future__ import absolute_import
+
+import errno
+import inspect
+import os
+import random
+import time
 import urllib
-import peer, changegroup, subrepo, pushkey, obsolete, repoview
-import changelog, dirstate, filelog, manifest, context, bookmarks, phases
-import lock as lockmod
-import transaction, store, encoding, exchange, bundle2
-import scmutil, util, extensions, hook, error, revset, cmdutil
-import match as matchmod
-import merge as mergemod
-import tags as tagsmod
-from lock import release
-import weakref, errno, os, time, inspect, random
-import branchmap, pathutil
-import namespaces
+import weakref
+
+from .i18n import _
+from .node import (
+    hex,
+    nullid,
+    short,
+    wdirrev,
+)
+from . import (
+    bookmarks,
+    branchmap,
+    bundle2,
+    changegroup,
+    changelog,
+    cmdutil,
+    context,
+    dirstate,
+    encoding,
+    error,
+    exchange,
+    extensions,
+    filelog,
+    hook,
+    lock as lockmod,
+    manifest,
+    match as matchmod,
+    merge as mergemod,
+    namespaces,
+    obsolete,
+    pathutil,
+    peer,
+    phases,
+    pushkey,
+    repoview,
+    revset,
+    scmutil,
+    store,
+    subrepo,
+    tags as tagsmod,
+    transaction,
+    util,
+)
+
+release = lockmod.release
 propertycache = util.propertycache
 filecache = scmutil.filecache
 
--- a/tests/test-check-py3-compat.t	Mon Dec 21 21:52:58 2015 -0800
+++ b/tests/test-check-py3-compat.t	Wed Dec 23 12:30:14 2015 -0800
@@ -106,7 +106,6 @@
   mercurial/httpclient/_readers.py not using absolute_import
   mercurial/httpclient/socketutil.py not using absolute_import
   mercurial/keepalive.py requires print_function
-  mercurial/localrepo.py not using absolute_import
   mercurial/lsprof.py requires print_function
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function