Patchwork [1,of,7] py3: use absolute_import in win32text.py

login
register
mail settings
Submitter roby roby
Date April 17, 2016, 5:17 p.m.
Message ID <2b535d540fef4b6a1fde.1460913420@roby>
Download mbox | patch
Permalink /patch/14707/
State Deferred
Headers show

Comments

roby roby - April 17, 2016, 5:17 p.m.
# HG changeset patch
# User Robert Stanca <robert.stanca7@gmail.com>
# Date 1460912024 -10800
#      Sun Apr 17 19:53:44 2016 +0300
# Node ID 2b535d540fef4b6a1fdee7d72cf3fb99a8c7b6ab
# Parent  7da03f2a7c815c1d167790c6c6494f881b957f23
py3: use absolute_import in win32text.py

Patch

diff -r 7da03f2a7c81 -r 2b535d540fef hgext/win32text.py
--- a/hgext/win32text.py	Sat Mar 26 18:50:56 2016 +0900
+++ b/hgext/win32text.py	Sun Apr 17 19:53:44 2016 +0300
@@ -41,10 +41,16 @@ 
   # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
 '''
 
-from mercurial.i18n import _
-from mercurial.node import short
-from mercurial import util
+from __future__ import absolute_import
 import re
+from mercurial.i18n import (
+    _,
+)
+from mercurial import (
+    node,
+    util,
+)
+short = node.short
 
 # Note for extension authors: ONLY specify testedwith = 'internal' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
diff -r 7da03f2a7c81 -r 2b535d540fef tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Sat Mar 26 18:50:56 2016 +0900
+++ b/tests/test-check-py3-compat.t	Sun Apr 17 19:53:44 2016 +0300
@@ -36,7 +36,6 @@ 
   hgext/mq.py not using absolute_import
   hgext/rebase.py not using absolute_import
   hgext/share.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
   setup.py not using absolute_import