[PATCH 2 of 7] py3: use absolute_import in rebase.py

Robert Stanca robert.stanca7 at gmail.com
Sun Apr 17 13:17:01 EDT 2016


# HG changeset patch
# User Robert Stanca <robert.stanca7 at gmail.com>
# Date 1460912091 -10800
#      Sun Apr 17 19:54:51 2016 +0300
# Node ID 6f5a03ee0cfe154cea247da944222324681aefc7
# Parent  2b535d540fef4b6a1fdee7d72cf3fb99a8c7b6ab
py3: use absolute_import in rebase.py

diff -r 2b535d540fef -r 6f5a03ee0cfe hgext/rebase.py
--- a/hgext/rebase.py	Sun Apr 17 19:53:44 2016 +0300
+++ b/hgext/rebase.py	Sun Apr 17 19:54:51 2016 +0300
@@ -14,14 +14,40 @@
 https://mercurial-scm.org/wiki/RebaseExtension
 '''
 
-from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks
-from mercurial import extensions, patch, scmutil, phases, obsolete, error
-from mercurial import copies, destutil, repoview, registrar, revset
-from mercurial.commands import templateopts
-from mercurial.node import nullrev, nullid, hex, short
-from mercurial.lock import release
-from mercurial.i18n import _
-import os, errno
+from __future__ import absolute_import
+import errno
+import os
+from mercurial.i18n import (
+    _,
+)
+from mercurial import (
+    bookmarks,
+    cmdutil,
+    commands,
+    copies,
+    destutil,
+    error,
+    extensions,
+    hg,
+    lock,
+    merge,
+    node,
+    obsolete,
+    patch,
+    phases,
+    registrar,
+    repair,
+    repoview,
+    revset,
+    scmutil,
+    util,
+)
+templateopts = commands.templateopts
+nullrev = node.nullrev
+nullid = node.nullid
+hex = node.hex
+short = node.short
+release = lock.release
 
 # The following constants are used throughout the rebase module. The ordering of
 # their values must be maintained.
diff -r 2b535d540fef -r 6f5a03ee0cfe tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Sun Apr 17 19:53:44 2016 +0300
+++ b/tests/test-check-py3-compat.t	Sun Apr 17 19:54:51 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/rebase.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


More information about the Mercurial-devel mailing list