Patchwork [3,of,7] py3: use absolute_import share.py

login
register
mail settings
Submitter roby roby
Date April 17, 2016, 5:17 p.m.
Message ID <1e9f868dfa15c8e409c6.1460913422@roby>
Download mbox | patch
Permalink /patch/14708/
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 1460912143 -10800
#      Sun Apr 17 19:55:43 2016 +0300
# Node ID 1e9f868dfa15c8e409c670ad5236396f5ca39cde
# Parent  6f5a03ee0cfe154cea247da944222324681aefc7
py3: use absolute_import share.py

Patch

diff -r 6f5a03ee0cfe -r 1e9f868dfa15 hgext/share.py
--- a/hgext/share.py	Sun Apr 17 19:54:51 2016 +0300
+++ b/hgext/share.py	Sun Apr 17 19:55:43 2016 +0300
@@ -37,10 +37,22 @@ 
     The default naming mode is "identity."
 '''
 
-from mercurial.i18n import _
-from mercurial import cmdutil, commands, hg, util, extensions, bookmarks, error
-from mercurial.hg import repository, parseurl
+from __future__ import absolute_import
 import errno
+from mercurial.i18n import (
+    _,
+)
+from mercurial import (
+    bookmarks,
+    cmdutil,
+    commands,
+    error,
+    extensions,
+    hg,
+    util,
+)
+repository = hg.repository
+parseurl = hg.parseurl
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
diff -r 6f5a03ee0cfe -r 1e9f868dfa15 tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Sun Apr 17 19:54:51 2016 +0300
+++ b/tests/test-check-py3-compat.t	Sun Apr 17 19:55:43 2016 +0300
@@ -34,7 +34,6 @@ 
   hgext/largefiles/uisetup.py not using absolute_import
   hgext/largefiles/wirestore.py not using absolute_import
   hgext/mq.py not using absolute_import
-  hgext/share.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