Patchwork [3,of,3] win32mbcs: use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 9, 2016, 4:26 a.m.
Message ID <7159144420403116e0ff.1457497562@waste.org>
Download mbox | patch
Permalink /patch/13714/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 9, 2016, 4:26 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456955435 0
#      Wed Mar 02 21:50:35 2016 +0000
# Node ID 7159144420403116e0ff6cfa5e47c39141a07148
# Parent  7633109300555f96fc93171290287e02cacc8ef0
win32mbcs: use absolute_import
Pierre-Yves David - March 9, 2016, 6:05 p.m.
On 03/09/2016 04:26 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1456955435 0
> #      Wed Mar 02 21:50:35 2016 +0000
> # Node ID 7159144420403116e0ff6cfa5e47c39141a07148
> # Parent  7633109300555f96fc93171290287e02cacc8ef0
> win32mbcs: use absolute_import

Pushed to the clowncopter, thanks.

Patch

diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py
--- a/hgext/win32mbcs.py
+++ b/hgext/win32mbcs.py
@@ -44,10 +44,17 @@ 
 
 It is useful for the users who want to commit with UTF-8 log message.
 '''
+from __future__ import absolute_import
 
-import os, sys
+import os
+import sys
+
+from mercurial import (
+    encoding,
+    error,
+)
 from mercurial.i18n import _
-from mercurial import error, encoding
+
 # Note for extension authors: ONLY specify testedwith = 'internal' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
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
@@ -57,7 +57,6 @@ 
   hgext/rebase.py not using absolute_import
   hgext/share.py not using absolute_import
   hgext/transplant.py not using absolute_import
-  hgext/win32mbcs.py not using absolute_import
   hgext/win32text.py not using absolute_import
   i18n/check-translation.py not using absolute_import
   i18n/polib.py not using absolute_import