[PATCH 1 of 2] commandserver: use absolute_import

Yuya Nishihara yuya at tcha.org
Sun Dec 13 14:49:02 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1448373520 -32400
#      Tue Nov 24 22:58:40 2015 +0900
# Node ID d5bbc726e292099326891eedd2e5d1c309d84b8f
# Parent  1c78ada22f9dc6ede81f2c231cec65d5d77dc45d
commandserver: use absolute_import

diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
--- a/mercurial/commandserver.py
+++ b/mercurial/commandserver.py
@@ -5,10 +5,22 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from i18n import _
+from __future__ import absolute_import
+
+import SocketServer
+import errno
+import os
 import struct
-import sys, os, errno, traceback, SocketServer
-import dispatch, encoding, util, error
+import sys
+import traceback
+
+from .i18n import _
+from . import (
+    dispatch,
+    encoding,
+    error,
+    util,
+)
 
 logfile = None
 
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,7 +101,6 @@
   mercurial/byterange.py not using absolute_import
   mercurial/cmdutil.py not using absolute_import
   mercurial/commands.py not using absolute_import
-  mercurial/commandserver.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


More information about the Mercurial-devel mailing list