[PATCH 1 of 8] strip: use absolute_import
timeless
timeless at mozdev.org
Wed Mar 2 21:55:46 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1456953996 0
# Wed Mar 02 21:26:36 2016 +0000
# Node ID c50e8f7a361d305ba03487e5876c52d45c26f86a
# Parent c7f89ad87baef87f00c507545dfd4cc824bc3131
strip: use absolute_import
diff --git a/hgext/strip.py b/hgext/strip.py
--- a/hgext/strip.py
+++ b/hgext/strip.py
@@ -3,11 +3,23 @@
This extension allows you to strip changesets and all their descendants from the
repository. See the command help for details.
"""
+from __future__ import absolute_import
+
+from mercurial import (
+ bookmarks as bookmarksmod,
+ cmdutil,
+ error,
+ hg,
+ lock as lockmod,
+ merge,
+ node as nodemod,
+ repair,
+ scmutil,
+ util,
+)
from mercurial.i18n import _
-from mercurial.node import nullid
-from mercurial.lock import release
-from mercurial import cmdutil, hg, scmutil, util, error
-from mercurial import repair, bookmarks as bookmarksmod , merge
+nullid = nodemod.nullid
+release = lockmod.release
cmdtable = {}
command = cmdutil.command(cmdtable)
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -82,7 +82,6 @@
hgext/schemes.py not using absolute_import
hgext/share.py not using absolute_import
hgext/shelve.py not using absolute_import
- hgext/strip.py not using absolute_import
hgext/transplant.py not using absolute_import
hgext/win32mbcs.py not using absolute_import
hgext/win32text.py not using absolute_import
More information about the Mercurial-devel
mailing list