# HG changeset patch # User Augie Fackler # Date 1383774486 18000 # Node ID 1e5b38a919dd460ec7602dbd7c5d33bbdd008fb1 # Parent f962870712da97d317656ccd9b1a93148fa8251a cleanup: move stdlib imports to their own import statement There are a few warnings still produced by my import checker, but those are false positives produced by modules that share a name with stdlib modules. diff -r f962870712da -r 1e5b38a919dd mercurial/ancestor.py --- a/mercurial/ancestor.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/ancestor.py Wed Nov 06 16:48:06 2013 -0500 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import heapq, util +import heapq +import util from node import nullrev def ancestors(pfunc, *orignodes): diff -r f962870712da -r 1e5b38a919dd mercurial/commands.py --- a/mercurial/commands.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/commands.py Wed Nov 06 16:48:06 2013 -0500 @@ -17,7 +17,8 @@ import merge as mergemod import minirst, revset, fileset import dagparser, context, simplemerge, graphmod -import random, setdiscovery, treediscovery, dagutil, pvec, localrepo +import random +import setdiscovery, treediscovery, dagutil, pvec, localrepo import phases, obsolete table = {} diff -r f962870712da -r 1e5b38a919dd mercurial/fancyopts.py --- a/mercurial/fancyopts.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/fancyopts.py Wed Nov 06 16:48:06 2013 -0500 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import getopt, util +import getopt +import util from i18n import _ def gnugetopt(args, options, longoptions): diff -r f962870712da -r 1e5b38a919dd mercurial/fileset.py --- a/mercurial/fileset.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/fileset.py Wed Nov 06 16:48:06 2013 -0500 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import parser, error, util, merge, re +import re +import parser, error, util, merge from i18n import _ elements = { diff -r f962870712da -r 1e5b38a919dd mercurial/hbisect.py --- a/mercurial/hbisect.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/hbisect.py Wed Nov 06 16:48:06 2013 -0500 @@ -8,7 +8,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import os, error +import os +import error from i18n import _ from node import short, hex import util diff -r f962870712da -r 1e5b38a919dd mercurial/help.py --- a/mercurial/help.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/help.py Wed Nov 06 16:48:06 2013 -0500 @@ -6,7 +6,8 @@ # GNU General Public License version 2 or any later version. from i18n import gettext, _ -import itertools, sys, os, error +import itertools, sys, os +import error import extensions, revset, fileset, templatekw, templatefilters, filemerge import encoding, util, minirst import cmdutil diff -r f962870712da -r 1e5b38a919dd mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Wed Nov 06 16:48:06 2013 -0500 @@ -6,7 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import os +import os, re from mercurial import ui, hg, hook, error, encoding, templater, util, repoview from mercurial.templatefilters import websub from mercurial.i18n import _ @@ -14,7 +14,7 @@ from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR from request import wsgirequest -import webcommands, protocol, webutil, re +import webcommands, protocol, webutil perms = { 'changegroup': 'pull', diff -r f962870712da -r 1e5b38a919dd mercurial/mdiff.py --- a/mercurial/mdiff.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/mdiff.py Wed Nov 06 16:48:06 2013 -0500 @@ -6,8 +6,8 @@ # GNU General Public License version 2 or any later version. from i18n import _ -import bdiff, mpatch, util -import re, struct, base85, zlib +import bdiff, mpatch, util, base85 +import re, struct, zlib def splitnewlines(text): '''like str.splitlines, but only split on newlines.''' diff -r f962870712da -r 1e5b38a919dd mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/setdiscovery.py Wed Nov 06 16:48:06 2013 -0500 @@ -8,7 +8,8 @@ from node import nullid from i18n import _ -import random, util, dagutil +import random +import util, dagutil def _updatesample(dag, nodes, sample, always, quicksamplesize=0): # if nodes is empty we scan the entire graph diff -r f962870712da -r 1e5b38a919dd mercurial/util.py --- a/mercurial/util.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/util.py Wed Nov 06 16:48:06 2013 -0500 @@ -14,9 +14,9 @@ """ from i18n import _ -import error, osutil, encoding, collections +import error, osutil, encoding import errno, re, shutil, sys, tempfile, traceback -import os, time, datetime, calendar, textwrap, signal +import os, time, datetime, calendar, textwrap, signal, collections import imp, socket, urllib if os.name == 'nt': diff -r f962870712da -r 1e5b38a919dd mercurial/worker.py --- a/mercurial/worker.py Wed Nov 06 18:19:04 2013 -0500 +++ b/mercurial/worker.py Wed Nov 06 16:48:06 2013 -0500 @@ -6,7 +6,8 @@ # GNU General Public License version 2 or any later version. from i18n import _ -import errno, os, signal, sys, threading, util +import errno, os, signal, sys, threading +import util def countcpus(): '''try to count the number of CPUs on the system'''