Patchwork [1,of,8] strip: use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 2, 2016, 9:55 p.m.
Message ID <c50e8f7a361d305ba034.1456955746@waste.org>
Download mbox | patch
Permalink /patch/13564/
State Accepted
Delegated to: Augie Fackler
Headers show

Comments

timeless@mozdev.org - March 2, 2016, 9:55 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456953996 0
#      Wed Mar 02 21:26:36 2016 +0000
# Node ID c50e8f7a361d305ba03487e5876c52d45c26f86a
# Parent  c7f89ad87baef87f00c507545dfd4cc824bc3131
strip: use absolute_import

Patch

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