# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1460832282 -19800 # Node ID 98153441c8ccfdf43e8898e4f0203f76c0a8b340 # Parent 9dcc9ed26d335f7869a5e33ceca26134a7edc035 py3: make check-seclevel use absolute_import Also fixed direct symbol imports even the tests were not complaining. diff -r 9dcc9ed26d33 -r 98153441c8cc doc/check-seclevel.py --- a/doc/check-seclevel.py Thu Apr 14 15:20:11 2016 +0000 +++ b/doc/check-seclevel.py Sun Apr 17 00:14:42 2016 +0530 @@ -2,18 +2,26 @@ # # checkseclevel - checking section title levels in each online help document -import sys, os +from __future__ import absolute_import + import optparse +import os +import sys # import from the live mercurial repo os.environ['HGMODULEPOLICY'] = 'py' sys.path.insert(0, "..") from mercurial import demandimport; demandimport.enable() -from mercurial.commands import table -from mercurial.help import helptable -from mercurial import extensions -from mercurial import minirst -from mercurial import ui as uimod +from mercurial import ( + commands, + extensions, + help, + minirst, + ui as uimod, +) + +table = commands.table +helptable = help.helptable level2mark = ['"', '=', '-', '.', '#'] reservedmarks = ['"'] diff -r 9dcc9ed26d33 -r 98153441c8cc tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Thu Apr 14 15:20:11 2016 +0000 +++ b/tests/test-check-py3-compat.t Sun Apr 17 00:14:42 2016 +0530 @@ -3,7 +3,6 @@ $ cd "$TESTDIR"/.. $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py - doc/check-seclevel.py not using absolute_import doc/gendoc.py not using absolute_import doc/hgmanpage.py not using absolute_import hgext/color.py not using absolute_import