##// END OF EJS Templates
Remove unused imports
Joel Rosdahl -
r6212:e75aab65 default
parent child Browse files
Show More
@@ -12,7 +12,7 b''
12 # <alias email> <actual email>
12 # <alias email> <actual email>
13
13
14 from mercurial.i18n import gettext as _
14 from mercurial.i18n import gettext as _
15 from mercurial import hg, mdiff, cmdutil, ui, util, templatefilters, node
15 from mercurial import mdiff, cmdutil, util, node
16 import os, sys
16 import os, sys
17
17
18 def get_tty_width():
18 def get_tty_width():
@@ -51,7 +51,7 b' qseries.missing = red bold'
51
51
52 import re, sys
52 import re, sys
53
53
54 from mercurial import commands, cmdutil, ui
54 from mercurial import commands, cmdutil
55 from mercurial.i18n import _
55 from mercurial.i18n import _
56
56
57 # start and stop parameters for effects
57 # start and stop parameters for effects
@@ -5,7 +5,7 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from common import NoRepo, SKIPREV, converter_source, converter_sink, mapfile
8 from common import NoRepo, SKIPREV, mapfile
9 from cvs import convert_cvs
9 from cvs import convert_cvs
10 from darcs import darcs_source
10 from darcs import darcs_source
11 from git import convert_git
11 from git import convert_git
@@ -1,6 +1,6 b''
1 # GNU Arch support for the convert extension
1 # GNU Arch support for the convert extension
2
2
3 from common import NoRepo, checktool, commandline, commit, converter_source
3 from common import NoRepo, commandline, commit, converter_source
4 from mercurial.i18n import _
4 from mercurial.i18n import _
5 from mercurial import util
5 from mercurial import util
6 import os, shutil, tempfile, stat
6 import os, shutil, tempfile, stat
@@ -16,7 +16,7 b''
16 import os, time
16 import os, time
17 from mercurial.i18n import _
17 from mercurial.i18n import _
18 from mercurial.node import bin, hex, nullid
18 from mercurial.node import bin, hex, nullid
19 from mercurial import hg, lock, revlog, util
19 from mercurial import hg, revlog, util
20
20
21 from common import NoRepo, commit, converter_source, converter_sink
21 from common import NoRepo, commit, converter_source, converter_sink
22
22
@@ -18,10 +18,6 b''
18 # along with this program; if not, write to the Free Software
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
20
21 from cStringIO import StringIO
22 import os
23 from tempfile import mktemp
24
25 from svn.core import SubversionException, Pool
21 from svn.core import SubversionException, Pool
26 import svn.ra
22 import svn.ra
27 import svn.client
23 import svn.client
@@ -7,7 +7,7 b''
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 from mercurial.node import nullid, short
9 from mercurial.node import nullid, short
10 from mercurial import commands, cmdutil, hg, node, util
10 from mercurial import commands, cmdutil, hg, util
11
11
12 def fetch(ui, repo, source='default', **opts):
12 def fetch(ui, repo, source='default', **opts):
13 '''Pull changes from a remote repository, merge new changes if needed.
13 '''Pull changes from a remote repository, merge new changes if needed.
@@ -10,7 +10,7 b' import sys'
10 from mercurial.cmdutil import revrange, show_changeset
10 from mercurial.cmdutil import revrange, show_changeset
11 from mercurial.commands import templateopts
11 from mercurial.commands import templateopts
12 from mercurial.i18n import _
12 from mercurial.i18n import _
13 from mercurial.node import nullid, nullrev
13 from mercurial.node import nullrev
14 from mercurial.util import Abort, canonpath
14 from mercurial.util import Abort, canonpath
15
15
16 def revision_grapher(repo, start_rev, stop_rev):
16 def revision_grapher(repo, start_rev, stop_rev):
@@ -46,7 +46,7 b''
46 # vdiff on hovered and selected revisions.
46 # vdiff on hovered and selected revisions.
47
47
48 import os
48 import os
49 from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
49 from mercurial import hg, commands, util, patch, revlog
50
50
51 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
51 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
52 """diff trees from two commits"""
52 """diff trees from two commits"""
@@ -31,13 +31,8 b" demandimport.ignore.extend(['pkgutil',"
31 'pkg_resources',
31 'pkg_resources',
32 '__main__',])
32 '__main__',])
33
33
34 import mimetypes
35
36 from mercurial.hgweb import hgweb_mod
37 from mercurial.hgweb.hgweb_mod import hgweb
34 from mercurial.hgweb.hgweb_mod import hgweb
38 from mercurial import util
35 from mercurial import util
39 from mercurial.hgweb.common import paritygen
40 from mercurial.node import hex
41 from mercurial.templatefilters import filters
36 from mercurial.templatefilters import filters
42
37
43 from pygments import highlight
38 from pygments import highlight
@@ -67,7 +67,7 b''
67 import os, errno, socket, tempfile
67 import os, errno, socket, tempfile
68 import email.MIMEMultipart, email.MIMEText, email.MIMEBase
68 import email.MIMEMultipart, email.MIMEText, email.MIMEBase
69 import email.Utils, email.Encoders
69 import email.Utils, email.Encoders
70 from mercurial import cmdutil, commands, hg, mail, ui, patch, util
70 from mercurial import cmdutil, commands, hg, mail, patch, util
71 from mercurial.i18n import _
71 from mercurial.i18n import _
72 from mercurial.node import bin
72 from mercurial.node import bin
73
73
@@ -27,7 +27,7 b''
27 # along with this program; if not, write to the Free Software
27 # along with this program; if not, write to the Free Software
28 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29
29
30 from mercurial import hg, util, commands
30 from mercurial import util, commands
31 from mercurial.i18n import _
31 from mercurial.i18n import _
32 import os
32 import os
33
33
@@ -8,9 +8,9 b''
8 '''interactive change selection during commit or qrefresh'''
8 '''interactive change selection during commit or qrefresh'''
9
9
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial import cmdutil, commands, cmdutil, extensions, hg, mdiff, patch, revlog
11 from mercurial import cmdutil, commands, extensions, hg, mdiff, patch
12 from mercurial import util
12 from mercurial import util
13 import copy, cStringIO, errno, operator, os, re, shutil, tempfile
13 import copy, cStringIO, errno, operator, os, re, tempfile
14
14
15 lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
15 lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
16
16
@@ -7,7 +7,7 b''
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 import os, tempfile
9 import os, tempfile
10 from mercurial import bundlerepo, changegroup, cmdutil, commands, hg, merge
10 from mercurial import bundlerepo, changegroup, cmdutil, hg, merge
11 from mercurial import patch, revlog, util
11 from mercurial import patch, revlog, util
12
12
13 '''patch transplanting tool
13 '''patch transplanting tool
@@ -22,7 +22,6 b''
22 # [hooks]
22 # [hooks]
23 # pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
23 # pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
24
24
25 from mercurial import util, ui
26 from mercurial.i18n import gettext as _
25 from mercurial.i18n import gettext as _
27 from mercurial.node import bin, short
26 from mercurial.node import bin, short
28 import re
27 import re
@@ -7,8 +7,7 b''
7
7
8 from node import bin, hex, nullid
8 from node import bin, hex, nullid
9 from revlog import revlog
9 from revlog import revlog
10 from i18n import _
10 import util
11 import os, time, util
12
11
13 def _string_escape(text):
12 def _string_escape(text):
14 """
13 """
@@ -10,7 +10,7 b' from i18n import _'
10 import os, re, sys, urllib
10 import os, re, sys, urllib
11 import hg, util, revlog, bundlerepo, extensions
11 import hg, util, revlog, bundlerepo, extensions
12 import difflib, patch, time, help, mdiff, tempfile
12 import difflib, patch, time, help, mdiff, tempfile
13 import errno, version, socket
13 import version, socket
14 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
14 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
15
15
16 # Commands start here, listed alphabetically
16 # Commands start here, listed alphabetically
@@ -7,7 +7,7 b''
7
7
8 from node import nullid, nullrev, short
8 from node import nullid, nullrev, short
9 from i18n import _
9 from i18n import _
10 import ancestor, bdiff, repo, revlog, util, os, errno
10 import ancestor, bdiff, revlog, util, os, errno
11
11
12 class changectx(object):
12 class changectx(object):
13 """A changecontext object makes access to data related to a particular
13 """A changecontext object makes access to data related to a particular
@@ -9,7 +9,7 b' of the GNU General Public License, incor'
9
9
10 from node import nullid
10 from node import nullid
11 from i18n import _
11 from i18n import _
12 import struct, os, time, bisect, stat, strutil, util, re, errno, ignore
12 import struct, os, bisect, stat, strutil, util, errno, ignore
13 import cStringIO, osutil
13 import cStringIO, osutil
14
14
15 _unknown = ('?', 0, 0, 0)
15 _unknown = ('?', 0, 0, 0)
@@ -6,7 +6,7 b''
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import imp, os
8 import imp, os
9 import util, sys
9 import util
10 from i18n import _
10 from i18n import _
11
11
12 _extensions = {}
12 _extensions = {}
@@ -7,7 +7,6 b''
7
7
8 from node import bin, nullid
8 from node import bin, nullid
9 from revlog import revlog
9 from revlog import revlog
10 import os
11
10
12 class filelog(revlog):
11 class filelog(revlog):
13 def __init__(self, opener, path):
12 def __init__(self, opener, path):
@@ -7,7 +7,7 b''
7
7
8 from node import nullrev
8 from node import nullrev
9 from i18n import _
9 from i18n import _
10 import util, os, tempfile, context, simplemerge, re, filecmp
10 import util, os, tempfile, simplemerge, re, filecmp
11
11
12 def _toolstr(ui, tool, part, default=""):
12 def _toolstr(ui, tool, part, default=""):
13 return ui.config("merge-tools", tool + "." + part, default)
13 return ui.config("merge-tools", tool + "." + part, default)
@@ -5,9 +5,8 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import cStringIO, zlib, bz2, tempfile, errno, os, sys
8 import cStringIO, zlib, tempfile, errno, os, sys
9 from mercurial import util, streamclone
9 from mercurial import util, streamclone
10 from mercurial.i18n import gettext as _
11 from mercurial.node import bin, hex
10 from mercurial.node import bin, hex
12 from mercurial import changegroup as changegroupmod
11 from mercurial import changegroup as changegroupmod
13 from common import HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
12 from common import HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
@@ -7,7 +7,6 b''
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import socket, cgi, errno
9 import socket, cgi, errno
10 from mercurial.i18n import gettext as _
11 from common import ErrorResponse, statusmessage
10 from common import ErrorResponse, statusmessage
12
11
13 class wsgirequest(object):
12 class wsgirequest(object):
@@ -7,7 +7,7 b''
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
10 from mercurial import ui, hg, util, templater
10 from mercurial import hg, util
11 from hgweb_mod import hgweb
11 from hgweb_mod import hgweb
12 from hgwebdir_mod import hgwebdir
12 from hgwebdir_mod import hgwebdir
13 from mercurial.i18n import gettext as _
13 from mercurial.i18n import gettext as _
@@ -10,7 +10,7 b' from node import bin, hex'
10 from remoterepo import remoterepository
10 from remoterepo import remoterepository
11 from i18n import _
11 from i18n import _
12 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
12 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
13 import errno, keepalive, tempfile, socket, changegroup
13 import errno, keepalive, socket, changegroup
14
14
15 class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm):
15 class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm):
16 def __init__(self, ui):
16 def __init__(self, ui):
@@ -9,7 +9,7 b' from node import bin, hex, nullid, nullr'
9 from i18n import _
9 from i18n import _
10 import repo, changegroup
10 import repo, changegroup
11 import changelog, dirstate, filelog, manifest, context, weakref
11 import changelog, dirstate, filelog, manifest, context, weakref
12 import re, lock, transaction, tempfile, stat, errno, ui
12 import lock, transaction, stat, errno, ui
13 import os, revlog, time, util, extensions, hook, inspect
13 import os, revlog, time, util, extensions, hook, inspect
14
14
15 class localrepository(repo.repository):
15 class localrepository(repo.repository):
@@ -1,7 +1,7 b''
1 #! /usr/bin/env python
1 #! /usr/bin/env python
2
2
3 import sys
3 import sys
4 from _lsprof import Profiler, profiler_entry, profiler_subentry
4 from _lsprof import Profiler, profiler_entry
5
5
6 __all__ = ['profile', 'Stats']
6 __all__ = ['profile', 'Stats']
7
7
@@ -8,7 +8,7 b''
8 from node import bin, hex, nullid
8 from node import bin, hex, nullid
9 from revlog import revlog, RevlogError
9 from revlog import revlog, RevlogError
10 from i18n import _
10 from i18n import _
11 import array, bisect, struct, mdiff
11 import array, struct, mdiff
12
12
13 class manifestdict(dict):
13 class manifestdict(dict):
14 def __init__(self, mapping=None, flags=None):
14 def __init__(self, mapping=None, flags=None):
@@ -12,7 +12,7 b' of the GNU General Public License, incor'
12
12
13 from node import bin, hex, nullid, nullrev, short
13 from node import bin, hex, nullid, nullrev, short
14 from i18n import _
14 from i18n import _
15 import binascii, changegroup, errno, ancestor, mdiff, os
15 import changegroup, errno, ancestor, mdiff
16 import sha, struct, util, zlib
16 import sha, struct, util, zlib
17
17
18 _pack = struct.pack
18 _pack = struct.pack
@@ -19,7 +19,7 b''
19 # s: "i hate that."
19 # s: "i hate that."
20
20
21 from i18n import _
21 from i18n import _
22 import util, mdiff, fancyopts, sys, os
22 import util, mdiff, sys, os
23
23
24 class CantReprocessAndShowBase(Exception):
24 class CantReprocessAndShowBase(Exception):
25 pass
25 pass
@@ -8,7 +8,7 b''
8 from node import bin, hex
8 from node import bin, hex
9 from remoterepo import remotelock, remoterepository
9 from remoterepo import remotelock, remoterepository
10 from i18n import _
10 from i18n import _
11 import repo, os, re, stat, util
11 import repo, os, re, util
12
12
13 class sshrepository(remoterepository):
13 class sshrepository(remoterepository):
14 def __init__(self, ui, path, create=0):
14 def __init__(self, ui, path, create=0):
@@ -8,7 +8,7 b''
8 # of the GNU General Public License, incorporated herein by reference.
8 # of the GNU General Public License, incorporated herein by reference.
9
9
10 from i18n import _
10 from i18n import _
11 import changelog, filelog, httprangereader
11 import changelog, httprangereader
12 import repo, localrepo, manifest, util
12 import repo, localrepo, manifest, util
13 import urllib, urllib2, errno
13 import urllib, urllib2, errno
14
14
@@ -5,7 +5,6 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from i18n import _
9 import os, osutil, stat, util, lock
8 import os, osutil, stat, util, lock
10
9
11 # if server supports streaming clone, it advertises "stream"
10 # if server supports streaming clone, it advertises "stream"
@@ -13,7 +13,7 b' platform-specific details from the core.'
13 """
13 """
14
14
15 from i18n import _
15 from i18n import _
16 import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile, strutil
16 import cStringIO, errno, getpass, re, shutil, sys, tempfile
17 import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
17 import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
18 import urlparse
18 import urlparse
19
19
@@ -13,7 +13,6 b''
13
13
14 import win32api
14 import win32api
15
15
16 from i18n import _
17 import errno, os, pywintypes, win32con, win32file, win32process
16 import errno, os, pywintypes, win32con, win32file, win32process
18 import cStringIO, winerror
17 import cStringIO, winerror
19 import osutil
18 import osutil
@@ -7,7 +7,6 b''
7 # GPL-compatible.
7 # GPL-compatible.
8
8
9 import sys
9 import sys
10 import os
11 import md5
10 import md5
12
11
13 for filename in sys.argv[1:]:
12 for filename in sys.argv[1:]:
@@ -12,7 +12,6 b' import errno'
12 import optparse
12 import optparse
13 import os
13 import os
14 import popen2
14 import popen2
15 import re
16 import shutil
15 import shutil
17 import signal
16 import signal
18 import sys
17 import sys
@@ -1,5 +1,5 b''
1 import os
1 import os
2 from mercurial import hg, ui, commands
2 from mercurial import hg, ui
3
3
4 u = ui.ui()
4 u = ui.ui()
5
5
@@ -14,11 +14,8 b''
14 # along with this program; if not, write to the Free Software
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
16
17 import os
18 import unittest
17 import unittest
19 from unittest import TestCase
18 from unittest import TestCase
20 import imp
21 import shutil
22 from mercurial import util, simplemerge
19 from mercurial import util, simplemerge
23
20
24 # bzr compatible interface, for the tests
21 # bzr compatible interface, for the tests
General Comments 0
You need to be logged in to leave comments. Login now