Mercurial > hg-stable
changeset 29128:e521cb13d354
py3: make hgext/rebase.py use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 06 May 2016 22:21:32 +0530 |
parents | fa161ac73b24 |
children | e6dfb0e4eeef |
files | hgext/rebase.py tests/test-check-py3-compat.t |
diffstat | 2 files changed, 35 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Fri May 06 21:54:31 2016 +0530 +++ b/hgext/rebase.py Fri May 06 22:21:32 2016 +0530 @@ -14,14 +14,41 @@ 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 __future__ import absolute_import + +import errno +import os +from mercurial import ( + bookmarks, + cmdutil, + commands, + copies, + destutil, + error, + extensions, + hg, + lock, + merge, + obsolete, + patch, + phases, + registrar, + repair, + repoview, + revset, + scmutil, + util, +) +from mercurial.node import ( + hex, + nullid, + nullrev, + short, +) from mercurial.i18n import _ -import os, errno + +release = lock.release +templateopts = commands.templateopts # The following constants are used throughout the rebase module. The ordering of # their values must be maintained.
--- a/tests/test-check-py3-compat.t Fri May 06 21:54:31 2016 +0530 +++ b/tests/test-check-py3-compat.t Fri May 06 22:21:32 2016 +0530 @@ -21,7 +21,6 @@ hgext/largefiles/reposetup.py not using absolute_import hgext/largefiles/uisetup.py not using absolute_import hgext/largefiles/wirestore.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 @@ -89,7 +88,7 @@ hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) - hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) + hgext/rebase.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)