Patchwork [3,of,7] dirstate: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 23, 2015, 12:31 a.m.
Message ID <b1e8174e8a360db3f5e5.1450830706@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/12255/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Gregory Szorc - Dec. 23, 2015, 12:31 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1450762733 28800
#      Mon Dec 21 21:38:53 2015 -0800
# Node ID b1e8174e8a360db3f5e5340ea555c9ef0a1f43e7
# Parent  355447b7041d7767c1b8e7d8cb719563b220dc3e
dirstate: use absolute_import

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -4,13 +4,26 @@ 
 #
 # 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 nullid
-from i18n import _
-import scmutil, util, osutil, parsers, encoding, pathutil, error
-import os, stat, errno
-import match as matchmod
+from __future__ import absolute_import
+
+import errno
+import os
+import stat
+
+from .i18n import _
+from .node import nullid
+from . import (
+    encoding,
+    error,
+    match as matchmod,
+    osutil,
+    parsers,
+    pathutil,
+    scmutil,
+    util,
+)
 
 propertycache = util.propertycache
 filecache = scmutil.filecache
 _rangemask = 0x7fffffff
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
@@ -101,9 +101,8 @@ 
   mercurial/byterange.py not using absolute_import
   mercurial/cmdutil.py not using absolute_import
   mercurial/commands.py not using absolute_import
   mercurial/context.py not using absolute_import
-  mercurial/dirstate.py not using absolute_import
   mercurial/dispatch.py requires print_function
   mercurial/exchange.py not using absolute_import
   mercurial/httpclient/__init__.py not using absolute_import
   mercurial/httpclient/_readers.py not using absolute_import