Remove unused imports

This commit is contained in:
Joel Rosdahl 2008-03-06 22:23:41 +01:00
parent 5dae3059a0
commit 4f8012378a
40 changed files with 31 additions and 52 deletions

View File

@ -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():

View File

@ -51,7 +51,7 @@ qseries.missing = red bold
import re, sys
from mercurial import commands, cmdutil, ui
from mercurial import commands, cmdutil
from mercurial.i18n import _
# start and stop parameters for effects

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -10,7 +10,7 @@ import sys
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):

View File

@ -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"""

View File

@ -31,13 +31,8 @@ demandimport.ignore.extend(['pkgutil',
'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

View File

@ -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

View File

@ -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

View File

@ -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*(.*)')

View File

@ -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

View File

@ -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

View File

@ -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):
"""

View File

@ -10,7 +10,7 @@ from i18n import _
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

View File

@ -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

View File

@ -9,7 +9,7 @@ of the GNU General Public License, incorporated herein by reference.
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)

View File

@ -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 = {}

View File

@ -7,7 +7,6 @@
from node import bin, nullid
from revlog import revlog
import os
class filelog(revlog):
def __init__(self, opener, path):

View File

@ -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)

View File

@ -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

View File

@ -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):

View File

@ -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 _

View File

@ -10,7 +10,7 @@ from node import bin, hex
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):

View File

@ -9,7 +9,7 @@ from node import bin, hex, nullid, nullrev, short
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):

View File

@ -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']

View File

@ -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):

View File

@ -12,7 +12,7 @@ of the GNU General Public License, incorporated herein by reference.
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

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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"

View File

@ -13,7 +13,7 @@ platform-specific details from the core.
"""
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

View File

@ -13,7 +13,6 @@
import win32api
from i18n import _
import errno, os, pywintypes, win32con, win32file, win32process
import cStringIO, winerror
import osutil

View File

@ -7,7 +7,6 @@
# GPL-compatible.
import sys
import os
import md5
for filename in sys.argv[1:]:

View File

@ -12,7 +12,6 @@ import errno
import optparse
import os
import popen2
import re
import shutil
import signal
import sys

View File

@ -1,5 +1,5 @@
import os
from mercurial import hg, ui, commands
from mercurial import hg, ui
u = ui.ui()

View File

@ -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