# HG changeset patch # User timeless # Date 1456954962 0 # Node ID 21524ae331b7882d296b0460e359c7844e112af0 # Parent 4817c17a11a2c4fee10e69ceaace9ba33ce3bc90 patchbomb: use absolute_import diff -r 4817c17a11a2 -r 21524ae331b7 hgext/patchbomb.py --- a/hgext/patchbomb.py Wed Mar 02 16:34:43 2016 +0000 +++ b/hgext/patchbomb.py Wed Mar 02 21:42:42 2016 +0000 @@ -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 -r 4817c17a11a2 -r 21524ae331b7 tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Wed Mar 02 16:34:43 2016 +0000 +++ b/tests/test-check-py3-compat.t Wed Mar 02 21:42:42 2016 +0000 @@ -45,7 +45,6 @@ hgext/largefiles/wirestore.py not using absolute_import hgext/mq.py not using absolute_import hgext/notify.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