--- a/contrib/churn.py Thu Mar 06 22:23:26 2008 +0100
+++ b/contrib/churn.py Thu Mar 06 22:23:41 2008 +0100
@@ -12,7 +12,7 @@
# <alias email> <actual email>
from mercurial.i18n import gettext as _
-from mercurial import hg, mdiff, cmdutil, ui, util, templatefilters, node
+from mercurial import mdiff, cmdutil, util, node
import os, sys
def get_tty_width():
--- a/hgext/color.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/color.py Thu Mar 06 22:23:41 2008 +0100
@@ -51,7 +51,7 @@
import re, sys
-from mercurial import commands, cmdutil, ui
+from mercurial import commands, cmdutil
from mercurial.i18n import _
# start and stop parameters for effects
--- a/hgext/convert/convcmd.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/convert/convcmd.py Thu Mar 06 22:23:41 2008 +0100
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from common import NoRepo, SKIPREV, converter_source, converter_sink, mapfile
+from common import NoRepo, SKIPREV, mapfile
from cvs import convert_cvs
from darcs import darcs_source
from git import convert_git
--- a/hgext/convert/gnuarch.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/convert/gnuarch.py Thu Mar 06 22:23:41 2008 +0100
@@ -1,6 +1,6 @@
# GNU Arch support for the convert extension
-from common import NoRepo, checktool, commandline, commit, converter_source
+from common import NoRepo, commandline, commit, converter_source
from mercurial.i18n import _
from mercurial import util
import os, shutil, tempfile, stat
--- a/hgext/convert/hg.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/convert/hg.py Thu Mar 06 22:23:41 2008 +0100
@@ -16,7 +16,7 @@
import os, time
from mercurial.i18n import _
from mercurial.node import bin, hex, nullid
-from mercurial import hg, lock, revlog, util
+from mercurial import hg, revlog, util
from common import NoRepo, commit, converter_source, converter_sink
--- a/hgext/convert/transport.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/convert/transport.py Thu Mar 06 22:23:41 2008 +0100
@@ -18,10 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-from cStringIO import StringIO
-import os
-from tempfile import mktemp
-
from svn.core import SubversionException, Pool
import svn.ra
import svn.client
--- a/hgext/fetch.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/fetch.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,7 @@
from mercurial.i18n import _
from mercurial.node import nullid, short
-from mercurial import commands, cmdutil, hg, node, util
+from mercurial import commands, cmdutil, hg, util
def fetch(ui, repo, source='default', **opts):
'''Pull changes from a remote repository, merge new changes if needed.
--- a/hgext/graphlog.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/graphlog.py Thu Mar 06 22:23:41 2008 +0100
@@ -10,7 +10,7 @@
from mercurial.cmdutil import revrange, show_changeset
from mercurial.commands import templateopts
from mercurial.i18n import _
-from mercurial.node import nullid, nullrev
+from mercurial.node import nullrev
from mercurial.util import Abort, canonpath
def revision_grapher(repo, start_rev, stop_rev):
--- a/hgext/hgk.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/hgk.py Thu Mar 06 22:23:41 2008 +0100
@@ -46,7 +46,7 @@
# vdiff on hovered and selected revisions.
import os
-from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
+from mercurial import hg, commands, util, patch, revlog
def difftree(ui, repo, node1=None, node2=None, *files, **opts):
"""diff trees from two commits"""
--- a/hgext/highlight.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/highlight.py Thu Mar 06 22:23:41 2008 +0100
@@ -31,13 +31,8 @@
'pkg_resources',
'__main__',])
-import mimetypes
-
-from mercurial.hgweb import hgweb_mod
from mercurial.hgweb.hgweb_mod import hgweb
from mercurial import util
-from mercurial.hgweb.common import paritygen
-from mercurial.node import hex
from mercurial.templatefilters import filters
from pygments import highlight
--- a/hgext/patchbomb.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/patchbomb.py Thu Mar 06 22:23:41 2008 +0100
@@ -67,7 +67,7 @@
import os, errno, socket, tempfile
import email.MIMEMultipart, email.MIMEText, email.MIMEBase
import email.Utils, email.Encoders
-from mercurial import cmdutil, commands, hg, mail, ui, patch, util
+from mercurial import cmdutil, commands, hg, mail, patch, util
from mercurial.i18n import _
from mercurial.node import bin
--- a/hgext/purge.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/purge.py Thu Mar 06 22:23:41 2008 +0100
@@ -27,7 +27,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-from mercurial import hg, util, commands
+from mercurial import util, commands
from mercurial.i18n import _
import os
--- a/hgext/record.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/record.py Thu Mar 06 22:23:41 2008 +0100
@@ -8,9 +8,9 @@
'''interactive change selection during commit or qrefresh'''
from mercurial.i18n import _
-from mercurial import cmdutil, commands, cmdutil, extensions, hg, mdiff, patch, revlog
+from mercurial import cmdutil, commands, extensions, hg, mdiff, patch
from mercurial import util
-import copy, cStringIO, errno, operator, os, re, shutil, tempfile
+import copy, cStringIO, errno, operator, os, re, tempfile
lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
--- a/hgext/transplant.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/transplant.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,7 @@
from mercurial.i18n import _
import os, tempfile
-from mercurial import bundlerepo, changegroup, cmdutil, commands, hg, merge
+from mercurial import bundlerepo, changegroup, cmdutil, hg, merge
from mercurial import patch, revlog, util
'''patch transplanting tool
--- a/hgext/win32text.py Thu Mar 06 22:23:26 2008 +0100
+++ b/hgext/win32text.py Thu Mar 06 22:23:41 2008 +0100
@@ -22,7 +22,6 @@
# [hooks]
# pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
-from mercurial import util, ui
from mercurial.i18n import gettext as _
from mercurial.node import bin, short
import re
--- a/mercurial/changelog.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/changelog.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,8 +7,7 @@
from node import bin, hex, nullid
from revlog import revlog
-from i18n import _
-import os, time, util
+import util
def _string_escape(text):
"""
--- a/mercurial/commands.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/commands.py Thu Mar 06 22:23:41 2008 +0100
@@ -10,7 +10,7 @@
import os, re, sys, urllib
import hg, util, revlog, bundlerepo, extensions
import difflib, patch, time, help, mdiff, tempfile
-import errno, version, socket
+import version, socket
import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
# Commands start here, listed alphabetically
--- a/mercurial/context.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/context.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,7 @@
from node import nullid, nullrev, short
from i18n import _
-import ancestor, bdiff, repo, revlog, util, os, errno
+import ancestor, bdiff, revlog, util, os, errno
class changectx(object):
"""A changecontext object makes access to data related to a particular
--- a/mercurial/dirstate.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/dirstate.py Thu Mar 06 22:23:41 2008 +0100
@@ -9,7 +9,7 @@
from node import nullid
from i18n import _
-import struct, os, time, bisect, stat, strutil, util, re, errno, ignore
+import struct, os, bisect, stat, strutil, util, errno, ignore
import cStringIO, osutil
_unknown = ('?', 0, 0, 0)
--- a/mercurial/extensions.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/extensions.py Thu Mar 06 22:23:41 2008 +0100
@@ -6,7 +6,7 @@
# of the GNU General Public License, incorporated herein by reference.
import imp, os
-import util, sys
+import util
from i18n import _
_extensions = {}
--- a/mercurial/filelog.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/filelog.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,6 @@
from node import bin, nullid
from revlog import revlog
-import os
class filelog(revlog):
def __init__(self, opener, path):
--- a/mercurial/filemerge.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/filemerge.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,7 @@
from node import nullrev
from i18n import _
-import util, os, tempfile, context, simplemerge, re, filecmp
+import util, os, tempfile, simplemerge, re, filecmp
def _toolstr(ui, tool, part, default=""):
return ui.config("merge-tools", tool + "." + part, default)
--- a/mercurial/hgweb/protocol.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/hgweb/protocol.py Thu Mar 06 22:23:41 2008 +0100
@@ -5,9 +5,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-import cStringIO, zlib, bz2, tempfile, errno, os, sys
+import cStringIO, zlib, tempfile, errno, os, sys
from mercurial import util, streamclone
-from mercurial.i18n import gettext as _
from mercurial.node import bin, hex
from mercurial import changegroup as changegroupmod
from common import HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
--- a/mercurial/hgweb/request.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/hgweb/request.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,6 @@
# of the GNU General Public License, incorporated herein by reference.
import socket, cgi, errno
-from mercurial.i18n import gettext as _
from common import ErrorResponse, statusmessage
class wsgirequest(object):
--- a/mercurial/hgweb/server.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/hgweb/server.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,7 @@
# of the GNU General Public License, incorporated herein by reference.
import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
-from mercurial import ui, hg, util, templater
+from mercurial import hg, util
from hgweb_mod import hgweb
from hgwebdir_mod import hgwebdir
from mercurial.i18n import gettext as _
--- a/mercurial/httprepo.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/httprepo.py Thu Mar 06 22:23:41 2008 +0100
@@ -10,7 +10,7 @@
from remoterepo import remoterepository
from i18n import _
import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
-import errno, keepalive, tempfile, socket, changegroup
+import errno, keepalive, socket, changegroup
class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm):
def __init__(self, ui):
--- a/mercurial/localrepo.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/localrepo.py Thu Mar 06 22:23:41 2008 +0100
@@ -9,7 +9,7 @@
from i18n import _
import repo, changegroup
import changelog, dirstate, filelog, manifest, context, weakref
-import re, lock, transaction, tempfile, stat, errno, ui
+import lock, transaction, stat, errno, ui
import os, revlog, time, util, extensions, hook, inspect
class localrepository(repo.repository):
--- a/mercurial/lsprof.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/lsprof.py Thu Mar 06 22:23:41 2008 +0100
@@ -1,7 +1,7 @@
#! /usr/bin/env python
import sys
-from _lsprof import Profiler, profiler_entry, profiler_subentry
+from _lsprof import Profiler, profiler_entry
__all__ = ['profile', 'Stats']
--- a/mercurial/manifest.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/manifest.py Thu Mar 06 22:23:41 2008 +0100
@@ -8,7 +8,7 @@
from node import bin, hex, nullid
from revlog import revlog, RevlogError
from i18n import _
-import array, bisect, struct, mdiff
+import array, struct, mdiff
class manifestdict(dict):
def __init__(self, mapping=None, flags=None):
--- a/mercurial/revlog.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/revlog.py Thu Mar 06 22:23:41 2008 +0100
@@ -12,7 +12,7 @@
from node import bin, hex, nullid, nullrev, short
from i18n import _
-import binascii, changegroup, errno, ancestor, mdiff, os
+import changegroup, errno, ancestor, mdiff
import sha, struct, util, zlib
_pack = struct.pack
--- a/mercurial/simplemerge.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/simplemerge.py Thu Mar 06 22:23:41 2008 +0100
@@ -19,7 +19,7 @@
# s: "i hate that."
from i18n import _
-import util, mdiff, fancyopts, sys, os
+import util, mdiff, sys, os
class CantReprocessAndShowBase(Exception):
pass
--- a/mercurial/sshrepo.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/sshrepo.py Thu Mar 06 22:23:41 2008 +0100
@@ -8,7 +8,7 @@
from node import bin, hex
from remoterepo import remotelock, remoterepository
from i18n import _
-import repo, os, re, stat, util
+import repo, os, re, util
class sshrepository(remoterepository):
def __init__(self, ui, path, create=0):
--- a/mercurial/statichttprepo.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/statichttprepo.py Thu Mar 06 22:23:41 2008 +0100
@@ -8,7 +8,7 @@
# of the GNU General Public License, incorporated herein by reference.
from i18n import _
-import changelog, filelog, httprangereader
+import changelog, httprangereader
import repo, localrepo, manifest, util
import urllib, urllib2, errno
--- a/mercurial/streamclone.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/streamclone.py Thu Mar 06 22:23:41 2008 +0100
@@ -5,7 +5,6 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from i18n import _
import os, osutil, stat, util, lock
# if server supports streaming clone, it advertises "stream"
--- a/mercurial/util.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/util.py Thu Mar 06 22:23:41 2008 +0100
@@ -13,7 +13,7 @@
"""
from i18n import _
-import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile, strutil
+import cStringIO, errno, getpass, re, shutil, sys, tempfile
import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
import urlparse
--- a/mercurial/util_win32.py Thu Mar 06 22:23:26 2008 +0100
+++ b/mercurial/util_win32.py Thu Mar 06 22:23:41 2008 +0100
@@ -13,7 +13,6 @@
import win32api
-from i18n import _
import errno, os, pywintypes, win32con, win32file, win32process
import cStringIO, winerror
import osutil
--- a/tests/md5sum.py Thu Mar 06 22:23:26 2008 +0100
+++ b/tests/md5sum.py Thu Mar 06 22:23:41 2008 +0100
@@ -7,7 +7,6 @@
# GPL-compatible.
import sys
-import os
import md5
for filename in sys.argv[1:]:
--- a/tests/run-tests.py Thu Mar 06 22:23:26 2008 +0100
+++ b/tests/run-tests.py Thu Mar 06 22:23:41 2008 +0100
@@ -12,7 +12,6 @@
import optparse
import os
import popen2
-import re
import shutil
import signal
import sys
--- a/tests/test-context.py Thu Mar 06 22:23:26 2008 +0100
+++ b/tests/test-context.py Thu Mar 06 22:23:41 2008 +0100
@@ -1,5 +1,5 @@
import os
-from mercurial import hg, ui, commands
+from mercurial import hg, ui
u = ui.ui()
--- a/tests/test-simplemerge.py Thu Mar 06 22:23:26 2008 +0100
+++ b/tests/test-simplemerge.py Thu Mar 06 22:23:41 2008 +0100
@@ -14,11 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-import os
import unittest
from unittest import TestCase
-import imp
-import shutil
from mercurial import util, simplemerge
# bzr compatible interface, for the tests