Patchwork [7,of,8] patchbomb: use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 2, 2016, 9:55 p.m.
Message ID <81dbf397b8df734d1224.1456955752@waste.org>
Download mbox | patch
Permalink /patch/13570/
State Superseded
Commit 21524ae331b7882d296b0460e359c7844e112af0
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 1456954962 0
#      Wed Mar 02 21:42:42 2016 +0000
# Node ID 81dbf397b8df734d12247c0454d3f9b84cfe0967
# Parent  f2baf07380e5be2bd9908220e7f5889fb8b822ce
patchbomb: use absolute_import

Patch

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -63,14 +63,27 @@ 
 You can set patchbomb to always ask for confirmation by setting
 ``patchbomb.confirm`` to true.
 '''
+from __future__ import absolute_import
 
-import os, errno, socket, tempfile, cStringIO
+import cStringIO
 import email as emailmod
+import errno
+import os
+import socket
+import tempfile
 
-from mercurial import cmdutil, commands, hg, mail, patch, util, error
-from mercurial import scmutil
+from mercurial import (
+    cmdutil,
+    commands,
+    error,
+    hg,
+    mail,
+    node as nodemod,
+    patch,
+    scmutil,
+    util,
+)
 from mercurial.i18n import _
-from mercurial.node import bin
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
@@ -167,7 +180,7 @@ 
             msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
         p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch',
                                opts.get('test'))
-        binnode = bin(node)
+        binnode = nodemod.bin(node)
         # if node is mq patch, it will have the patch file's name as a tag
         if not patchname:
             patchtags = [t for t in repo.nodetags(binnode)
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
@@ -74,7 +74,6 @@ 
   hgext/mq.py not using absolute_import
   hgext/notify.py not using absolute_import
   hgext/pager.py not using absolute_import
-  hgext/patchbomb.py not using absolute_import
   hgext/rebase.py not using absolute_import
   hgext/share.py not using absolute_import
   hgext/transplant.py not using absolute_import