# HG changeset patch # User Simon Heimberg # Date 1240933246 -7200 # Node ID b87a50b7125c6c2f14314e6393435b2b98679ae0 # Parent e0eb03bfa5af2123c0fb4f59551cab25ecf05d7a separate import lines from mercurial and general python modules diff -r e0eb03bfa5af -r b87a50b7125c mercurial/archival.py --- a/mercurial/archival.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/archival.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,8 @@ from i18n import _ from node import hex -import cStringIO, os, stat, tarfile, time, util, zipfile +import util +import cStringIO, os, stat, tarfile, time, zipfile import zlib, gzip def tidyprefix(dest, prefix, suffixes): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/bundlerepo.py Tue Apr 28 17:40:46 2009 +0200 @@ -13,7 +13,8 @@ from node import nullid from i18n import _ -import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff +import os, struct, bz2, zlib, tempfile, shutil +import changegroup, util, mdiff import localrepo, changelog, manifest, filelog, revlog, error class bundlerevlog(revlog.revlog): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/changegroup.py --- a/mercurial/changegroup.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/changegroup.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import struct, os, bz2, zlib, util, tempfile +import util +import struct, os, bz2, zlib, tempfile def getchunk(source): """get a chunk from a changegroup""" diff -r e0eb03bfa5af -r b87a50b7125c mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/cmdutil.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,8 +7,8 @@ from node import hex, nullid, nullrev, short from i18n import _ -import os, sys, bisect, stat, encoding -import mdiff, bdiff, util, templater, templatefilters, patch, errno, error +import os, sys, bisect, stat, errno +import mdiff, bdiff, util, templater, templatefilters, patch, error, encoding import match as _match revrangesep = ':' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/commands.py --- a/mercurial/commands.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/commands.py Tue Apr 28 17:40:46 2009 +0200 @@ -8,10 +8,11 @@ from node import hex, nullid, nullrev, short from lock import release from i18n import _, gettext -import os, re, sys, textwrap, subprocess +import os, re, sys, textwrap, subprocess, difflib, time import hg, util, revlog, bundlerepo, extensions, copies, context, error -import difflib, patch, time, help, mdiff, tempfile, url, encoding -import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect +import patch, help, mdiff, tempfile, url, encoding +import archival, changegroup, cmdutil, sshserver, hbisect +from hgweb import server import merge as merge_ # Commands start here, listed alphabetically @@ -2698,7 +2699,7 @@ class service: def init(self): util.set_signal_handler() - self.httpd = hgweb.server.create_server(baseui, repo) + self.httpd = server.create_server(baseui, repo) if not ui.verbose: return diff -r e0eb03bfa5af -r b87a50b7125c mercurial/config.py --- a/mercurial/config.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/config.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import re, error, os +import error +import re, os class sortdict(dict): 'a simple sorted dictionary' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/context.py --- a/mercurial/context.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/context.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,8 @@ from node import nullid, nullrev, short, hex from i18n import _ -import ancestor, bdiff, error, util, os, errno +import ancestor, bdiff, error, util +import os, errno propertycache = util.propertycache diff -r e0eb03bfa5af -r b87a50b7125c mercurial/copies.py --- a/mercurial/copies.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/copies.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import util, heapq +import util +import heapq def _nonoverlap(d1, d2, d3): "Return list of elements in d1 not in d2 or d3" diff -r e0eb03bfa5af -r b87a50b7125c mercurial/dirstate.py --- a/mercurial/dirstate.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/dirstate.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,8 +7,9 @@ from node import nullid from i18n import _ -import struct, os, stat, util, errno, ignore -import cStringIO, osutil, sys, parsers +import util, ignore, osutil, parsers +import struct, os, stat, errno +import cStringIO, sys _unknown = ('?', 0, 0, 0) _format = ">cllll" diff -r e0eb03bfa5af -r b87a50b7125c mercurial/encoding.py --- a/mercurial/encoding.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/encoding.py Tue Apr 28 17:40:46 2009 +0200 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. -import sys, unicodedata, locale, os, error +import error +import sys, unicodedata, locale, os _encodingfixup = {'646': 'ascii', 'ANSI_X3.4-1968': 'ascii'} diff -r e0eb03bfa5af -r b87a50b7125c mercurial/filemerge.py --- a/mercurial/filemerge.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/filemerge.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,8 @@ from node import short from i18n import _ -import util, os, tempfile, simplemerge, re, filecmp +import util, simplemerge +import os, tempfile, re, filecmp def _toolstr(ui, tool, part, default=""): return ui.config("merge-tools", tool + "." + part, default) diff -r e0eb03bfa5af -r b87a50b7125c mercurial/hg.py --- a/mercurial/hg.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/hg.py Tue Apr 28 17:40:46 2009 +0200 @@ -9,9 +9,10 @@ from i18n import _ from lock import release import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo -import errno, lock, os, shutil, util, extensions, error +import lock, util, extensions, error import merge as _merge import verify as _verify +import errno, os, shutil def _local(path): return (os.path.isfile(util.drop_scheme('file', path)) and diff -r e0eb03bfa5af -r b87a50b7125c mercurial/hook.py --- a/mercurial/hook.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/hook.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,8 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import util, os, sys -from mercurial import extensions +import os, sys +import extensions, util def _pythonhook(ui, repo, name, hname, funcname, args, throw): '''call python hook. hook is callable object, looked up as diff -r e0eb03bfa5af -r b87a50b7125c mercurial/httprepo.py --- a/mercurial/httprepo.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/httprepo.py Tue Apr 28 17:40:46 2009 +0200 @@ -8,8 +8,9 @@ from node import bin, hex, nullid from i18n import _ -import repo, os, urllib, urllib2, urlparse, zlib, util, httplib -import errno, socket, changegroup, statichttprepo, error, url +import repo, changegroup, statichttprepo, error, url, util +import os, urllib, urllib2, urlparse, zlib, httplib +import errno, socket def zgenerator(f): zd = zlib.decompressobj() diff -r e0eb03bfa5af -r b87a50b7125c mercurial/i18n.py --- a/mercurial/i18n.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/i18n.py Tue Apr 28 17:40:46 2009 +0200 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. -import gettext, sys, os, encoding +import encoding +import gettext, sys, os # modelled after templater.templatepath: if hasattr(sys, 'frozen'): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/ignore.py --- a/mercurial/ignore.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/ignore.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import util, re +import util +import re _commentre = None diff -r e0eb03bfa5af -r b87a50b7125c mercurial/localrepo.py --- a/mercurial/localrepo.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/localrepo.py Tue Apr 28 17:40:46 2009 +0200 @@ -8,13 +8,13 @@ from node import bin, hex, nullid, nullrev, short from i18n import _ import repo, changegroup -import changelog, dirstate, filelog, manifest, context, weakref -import lock, transaction, stat, errno, ui, store, encoding -import os, time, util, extensions, hook, inspect, error +import changelog, dirstate, filelog, manifest, context +import lock, transaction, ui, store, encoding +import util, extensions, hook, error import match as match_ import merge as merge_ - from lock import release +import weakref, stat, errno, os, time, inspect propertycache = util.propertycache class localrepository(repo.repository): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/lock.py --- a/mercurial/lock.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/lock.py Tue Apr 28 17:40:46 2009 +0200 @@ -5,7 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. -import errno, os, socket, time, util, error +import util, error +import errno, os, socket, time import warnings class lock(object): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/mail.py --- a/mercurial/mail.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/mail.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,9 +6,9 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ +import util, encoding import os, smtplib, socket import email.Header, email.MIMEText, email.Utils -import util, encoding def _smtp(ui): '''build an smtp connection and return a function to send mail''' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/manifest.py --- a/mercurial/manifest.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/manifest.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import array, struct, mdiff, parsers, util, error, revlog +import mdiff, parsers, util, error, revlog +import array, struct class manifestdict(dict): def __init__(self, mapping=None, flags=None): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/mdiff.py --- a/mercurial/mdiff.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/mdiff.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import bdiff, mpatch, re, struct, util +import bdiff, mpatch, util +import re, struct def splitnewlines(text): '''like str.splitlines, but only split on newlines.''' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/merge.py --- a/mercurial/merge.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/merge.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,8 @@ from node import nullid, nullrev, hex, bin from i18n import _ -import errno, util, os, filemerge, copies, shutil +import util, filemerge, copies +import errno, os, shutil class mergestate(object): '''track 3-way merge state of individual files''' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/posix.py --- a/mercurial/posix.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/posix.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import os, sys, osutil, errno, stat, getpass, pwd, grp +import osutil +import os, sys, errno, stat, getpass, pwd, grp posixfile = file nulldev = '/dev/null' diff -r e0eb03bfa5af -r b87a50b7125c mercurial/repair.py --- a/mercurial/repair.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/repair.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,9 +6,10 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. -import changegroup, os +import changegroup from node import nullrev, short from i18n import _ +import os def _bundle(repo, bases, heads, node, suffix, extranodes=None): """create a bundle with the specified revisions as a backup""" diff -r e0eb03bfa5af -r b87a50b7125c mercurial/revlog.py --- a/mercurial/revlog.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/revlog.py Tue Apr 28 17:40:46 2009 +0200 @@ -14,8 +14,8 @@ # import stuff from node for others to import from revlog from node import bin, hex, nullid, nullrev, short #@UnusedImport from i18n import _ -import changegroup, errno, ancestor, mdiff, parsers -import struct, util, zlib, error +import changegroup, ancestor, mdiff, parsers, error, util +import struct, zlib, errno _pack = struct.pack _unpack = struct.unpack diff -r e0eb03bfa5af -r b87a50b7125c mercurial/simplemerge.py --- a/mercurial/simplemerge.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/simplemerge.py Tue Apr 28 17:40:46 2009 +0200 @@ -19,7 +19,8 @@ # s: "i hate that." from i18n import _ -import util, mdiff, sys, os +import util, mdiff +import sys, os class CantReprocessAndShowBase(Exception): pass diff -r e0eb03bfa5af -r b87a50b7125c mercurial/sshrepo.py --- a/mercurial/sshrepo.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/sshrepo.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,8 @@ from node import bin, hex from i18n import _ -import repo, re, util, error +import repo, util, error +import re class remotelock(object): def __init__(self, repo): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/sshserver.py --- a/mercurial/sshserver.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/sshserver.py Tue Apr 28 17:40:46 2009 +0200 @@ -8,7 +8,8 @@ from i18n import _ from node import bin, hex -import os, streamclone, sys, tempfile, util, hook +import streamclone, util, hook +import os, sys, tempfile class sshserver(object): def __init__(self, ui, repo): diff -r e0eb03bfa5af -r b87a50b7125c mercurial/store.py --- a/mercurial/store.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/store.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import os, stat, osutil, util +import osutil, util +import os, stat _sha = util.sha1 diff -r e0eb03bfa5af -r b87a50b7125c mercurial/templater.py --- a/mercurial/templater.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/templater.py Tue Apr 28 17:40:46 2009 +0200 @@ -7,7 +7,7 @@ from i18n import _ import re, sys, os -from mercurial import util, config +import util, config path = ['templates', '../templates'] diff -r e0eb03bfa5af -r b87a50b7125c mercurial/ui.py --- a/mercurial/ui.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/ui.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,8 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import errno, getpass, os, re, socket, sys, tempfile -import config, traceback, util, error +import errno, getpass, os, re, socket, sys, tempfile, traceback +import config, util, error _booleans = {'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False} diff -r e0eb03bfa5af -r b87a50b7125c mercurial/util.py --- a/mercurial/util.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/util.py Tue Apr 28 17:40:46 2009 +0200 @@ -14,8 +14,9 @@ """ from i18n import _ -import cStringIO, errno, re, shutil, sys, tempfile, traceback, error -import os, stat, threading, time, calendar, glob, osutil, random +import error, osutil +import cStringIO, errno, re, shutil, sys, tempfile, traceback +import os, stat, threading, time, calendar, glob, random import imp # Python compatibility diff -r e0eb03bfa5af -r b87a50b7125c mercurial/windows.py --- a/mercurial/windows.py Thu May 07 15:08:25 2009 +0300 +++ b/mercurial/windows.py Tue Apr 28 17:40:46 2009 +0200 @@ -6,7 +6,8 @@ # GNU General Public License version 2, incorporated herein by reference. from i18n import _ -import errno, msvcrt, os, osutil, re, sys, error +import osutil, error +import errno, msvcrt, os, re, sys nulldev = 'NUL:' umask = 002