##// END OF EJS Templates
cleanup: drop unused imports
Peter Arrenbrecht -
r7873:4a4c7f6a default
parent child Browse files
Show More
@@ -9,7 +9,7 b''
9
9
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial import patch, cmdutil, util, templater
11 from mercurial import patch, cmdutil, util, templater
12 import os, sys
12 import sys
13 import time, datetime
13 import time, datetime
14
14
15 def maketemplater(ui, repo, tmpl):
15 def maketemplater(ui, repo, tmpl):
@@ -8,6 +8,7 b''
8
8
9 import convcmd
9 import convcmd
10 import cvsps
10 import cvsps
11 import subversion
11 from mercurial import commands
12 from mercurial import commands
12 from mercurial.i18n import _
13 from mercurial.i18n import _
13
14
@@ -199,7 +200,7 b' def convert(ui, src, dest=None, revmapfi'
199 return convcmd.convert(ui, src, dest, revmapfile, **opts)
200 return convcmd.convert(ui, src, dest, revmapfile, **opts)
200
201
201 def debugsvnlog(ui, **opts):
202 def debugsvnlog(ui, **opts):
202 return convcmd.debugsvnlog(ui, **opts)
203 return subversion.debugsvnlog(ui, **opts)
203
204
204 def debugcvsps(ui, *args, **opts):
205 def debugcvsps(ui, *args, **opts):
205 '''create changeset information from CVS
206 '''create changeset information from CVS
@@ -10,7 +10,7 b' 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
12 from hg import mercurial_source, mercurial_sink
12 from hg import mercurial_source, mercurial_sink
13 from subversion import debugsvnlog, svn_source, svn_sink
13 from subversion import svn_source, svn_sink
14 from monotone import monotone_source
14 from monotone import monotone_source
15 from gnuarch import gnuarch_source
15 from gnuarch import gnuarch_source
16 from bzr import bzr_source
16 from bzr import bzr_source
@@ -1,8 +1,8 b''
1 # monotone support for the convert extension
1 # monotone support for the convert extension
2
2
3 import os, re, time
3 import os, re
4 from mercurial import util
4 from mercurial import util
5 from common import NoRepo, MissingTool, commit, converter_source, checktool
5 from common import NoRepo, commit, converter_source, checktool
6 from common import commandline
6 from common import commandline
7 from mercurial.i18n import _
7 from mercurial.i18n import _
8
8
@@ -12,13 +12,12 b' revision graph is also shown.'
12 '''
12 '''
13
13
14 import os
14 import os
15 import sys
16 from mercurial.cmdutil import revrange, show_changeset
15 from mercurial.cmdutil import revrange, show_changeset
17 from mercurial.commands import templateopts, logopts, remoteopts
16 from mercurial.commands import templateopts
18 from mercurial.i18n import _
17 from mercurial.i18n import _
19 from mercurial.node import nullrev
18 from mercurial.node import nullrev
20 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions
19 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions
21 from mercurial import hg, ui, url, util
20 from mercurial import hg, url, util
22
21
23 def revisions(repo, start, stop):
22 def revisions(repo, start, stop):
24 """cset DAG generator yielding (rev, node, [parents]) tuples
23 """cset DAG generator yielding (rev, node, [parents]) tuples
@@ -65,7 +65,6 b' To use, configure notify extension and e'
65 push changes to, they can manage their own subscriptions.'''
65 push changes to, they can manage their own subscriptions.'''
66
66
67 from mercurial.i18n import _
67 from mercurial.i18n import _
68 from mercurial.node import bin, short
69 from mercurial import patch, cmdutil, templater, util, mail
68 from mercurial import patch, cmdutil, templater, util, mail
70 import email.Parser, fnmatch, socket, time
69 import email.Parser, fnmatch, socket, time
71
70
@@ -23,7 +23,6 b' For example, if you can refer to a revis'
23 foo~1 = foo^1 = foo^ = first parent of foo
23 foo~1 = foo^1 = foo^ = first parent of foo
24 foo~2 = foo^1^1 = foo^^ = first parent of first parent of foo
24 foo~2 = foo^1^1 = foo^^ = first parent of first parent of foo
25 '''
25 '''
26 import mercurial.repo
27 from mercurial import error
26 from mercurial import error
28
27
29 def reposetup(ui, repo):
28 def reposetup(ui, repo):
@@ -28,7 +28,7 b''
28 # # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
28 # # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
29
29
30 from mercurial.i18n import _
30 from mercurial.i18n import _
31 from mercurial.node import bin, short
31 from mercurial.node import short
32 from mercurial import util
32 from mercurial import util
33 import re
33 import re
34
34
@@ -10,10 +10,10 b' This software may be used and distribute'
10 of the GNU General Public License, incorporated herein by reference.
10 of the GNU General Public License, incorporated herein by reference.
11 """
11 """
12
12
13 from node import hex, nullid, short
13 from node import nullid
14 from i18n import _
14 from i18n import _
15 import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff
15 import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff
16 import repo, localrepo, changelog, manifest, filelog, revlog, context, error
16 import localrepo, changelog, manifest, filelog, revlog, error
17
17
18 class bundlerevlog(revlog.revlog):
18 class bundlerevlog(revlog.revlog):
19 def __init__(self, opener, indexfile, bundlefile,
19 def __init__(self, opener, indexfile, bundlefile,
@@ -158,7 +158,7 b' class bundlerepository(localrepo.localre'
158 localrepo.localrepository.__init__(self, ui, path)
158 localrepo.localrepository.__init__(self, ui, path)
159 except error.RepoError:
159 except error.RepoError:
160 self._tempparent = tempfile.mkdtemp()
160 self._tempparent = tempfile.mkdtemp()
161 tmprepo = localrepo.instance(ui,self._tempparent,1)
161 localrepo.instance(ui,self._tempparent,1)
162 localrepo.localrepository.__init__(self, ui, self._tempparent)
162 localrepo.localrepository.__init__(self, ui, self._tempparent)
163
163
164 if path:
164 if path:
@@ -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 node import nullid, nullrev
9 from i18n import _
8 from i18n import _
10 import util, heapq
9 import util, heapq
11
10
@@ -7,7 +7,7 b''
7
7
8 from i18n import _
8 from i18n import _
9 import os, sys, atexit, signal, pdb, socket, errno, shlex, time
9 import os, sys, atexit, signal, pdb, socket, errno, shlex, time
10 import util, commands, hg, lock, fancyopts, extensions, hook, error
10 import util, commands, hg, fancyopts, extensions, hook, error
11 import cmdutil
11 import cmdutil
12 import ui as _ui
12 import ui as _ui
13
13
@@ -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 node import nullrev, short
8 from node import short
9 from i18n import _
9 from i18n import _
10 import util, os, tempfile, simplemerge, re, filecmp
10 import util, os, tempfile, simplemerge, re, filecmp
11
11
@@ -6,8 +6,7 b''
6 # This software may be used and distributed according to the terms of
6 # This software may be used and distributed according to the terms of
7 # the GNU General Public License, incorporated herein by reference.
7 # the GNU General Public License, incorporated herein by reference.
8
8
9 from node import nullrev, short
9 from node import nullrev
10 import ui, hg, util, templatefilters
11
10
12 def graph(repo, start_rev, stop_rev):
11 def graph(repo, start_rev, stop_rev):
13 """incremental revision grapher
12 """incremental revision grapher
@@ -6,8 +6,7 b''
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
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, mimetypes
9 import os
10 from mercurial.node import hex, nullid
11 from mercurial import ui, hg, util, hook, error
10 from mercurial import ui, hg, util, hook, error
12 from mercurial import templater, templatefilters
11 from mercurial import templater, templatefilters
13 from common import get_mtime, style_map, ErrorResponse
12 from common import get_mtime, style_map, ErrorResponse
@@ -8,8 +8,8 b''
8 import os, mimetypes, re, cgi, copy
8 import os, mimetypes, re, cgi, copy
9 import webutil
9 import webutil
10 from mercurial import error, archival, templatefilters
10 from mercurial import error, archival, templatefilters
11 from mercurial.node import short, hex, nullid
11 from mercurial.node import short, hex
12 from mercurial.util import binary, datestr
12 from mercurial.util import binary
13 from common import paritygen, staticfile, get_contact, ErrorResponse
13 from common import paritygen, staticfile, get_contact, ErrorResponse
14 from common import HTTP_OK, HTTP_FORBIDDEN, HTTP_NOT_FOUND
14 from common import HTTP_OK, HTTP_FORBIDDEN, HTTP_NOT_FOUND
15 from mercurial import graphmod, util
15 from mercurial import graphmod, util
@@ -8,8 +8,8 b''
8
8
9 from i18n import _
9 from i18n import _
10 from node import hex, nullid, short
10 from node import hex, nullid, short
11 import base85, cmdutil, mdiff, util, revlog, diffhelpers, copies
11 import base85, cmdutil, mdiff, util, diffhelpers, copies
12 import cStringIO, email.Parser, os, re, errno, math
12 import cStringIO, email.Parser, os, re, math
13 import sys, tempfile, zlib
13 import sys, tempfile, zlib
14
14
15 gitre = re.compile('diff --git a/(.*) b/(.*)')
15 gitre = re.compile('diff --git a/(.*) b/(.*)')
@@ -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 node import bin, hex, nullid, nullrev
8 from node import bin, nullid, nullrev
9 import revlog, dirstate, struct, util, zlib
9 import revlog, dirstate, struct, util, zlib
10
10
11 _pack = struct.pack
11 _pack = struct.pack
@@ -7,6 +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 from i18n import _
9 from i18n import _
10 import error
10
11
11 class repository(object):
12 class repository(object):
12 def capable(self, name):
13 def capable(self, name):
@@ -10,7 +10,8 b' This software may be used and distribute'
10 of the GNU General Public License, incorporated herein by reference.
10 of the GNU General Public License, incorporated herein by reference.
11 """
11 """
12
12
13 from node import bin, hex, nullid, nullrev, short
13 # import stuff from node for others to import from revlog
14 from node import bin, hex, nullid, nullrev, short #@UnusedImport
14 from i18n import _
15 from i18n import _
15 import changegroup, errno, ancestor, mdiff, parsers
16 import changegroup, errno, ancestor, mdiff, parsers
16 import struct, util, zlib, error
17 import struct, util, zlib, error
@@ -7,7 +7,7 b''
7
7
8 from node import bin, hex
8 from node import bin, hex
9 from i18n import _
9 from i18n import _
10 import repo, os, re, util, error
10 import repo, re, util, error
11
11
12 class remotelock(object):
12 class remotelock(object):
13 def __init__(self, repo):
13 def __init__(self, repo):
@@ -9,7 +9,7 b''
9
9
10 from i18n import _
10 from i18n import _
11 import changelog, byterange, url, error
11 import changelog, byterange, url, error
12 import repo, localrepo, manifest, util, store
12 import localrepo, manifest, util, store
13 import urllib, urllib2, errno
13 import urllib, urllib2, errno
14
14
15 class httprangereader(object):
15 class httprangereader(object):
General Comments 0
You need to be logged in to leave comments. Login now