cleanup: drop unused imports
authorPeter Arrenbrecht <peter.arrenbrecht@gmail.com>
Mon, 23 Mar 2009 13:12:07 +0100
changeset 7873 4a4c7f6a5912
parent 7872 f680a1bd679b
child 7874 d812029cda85
cleanup: drop unused imports
hgext/churn.py
hgext/convert/__init__.py
hgext/convert/convcmd.py
hgext/convert/monotone.py
hgext/graphlog.py
hgext/notify.py
hgext/parentrevspec.py
hgext/win32text.py
mercurial/bundlerepo.py
mercurial/copies.py
mercurial/dispatch.py
mercurial/filemerge.py
mercurial/graphmod.py
mercurial/hgweb/hgweb_mod.py
mercurial/hgweb/webcommands.py
mercurial/patch.py
mercurial/pure/parsers.py
mercurial/repo.py
mercurial/revlog.py
mercurial/sshrepo.py
mercurial/statichttprepo.py
--- a/hgext/churn.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/churn.py	Mon Mar 23 13:12:07 2009 +0100
@@ -9,7 +9,7 @@
 
 from mercurial.i18n import _
 from mercurial import patch, cmdutil, util, templater
-import os, sys
+import sys
 import time, datetime
 
 def maketemplater(ui, repo, tmpl):
--- a/hgext/convert/__init__.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/convert/__init__.py	Mon Mar 23 13:12:07 2009 +0100
@@ -8,6 +8,7 @@
 
 import convcmd
 import cvsps
+import subversion
 from mercurial import commands
 from mercurial.i18n import _
 
@@ -199,7 +200,7 @@
     return convcmd.convert(ui, src, dest, revmapfile, **opts)
 
 def debugsvnlog(ui, **opts):
-    return convcmd.debugsvnlog(ui, **opts)
+    return subversion.debugsvnlog(ui, **opts)
 
 def debugcvsps(ui, *args, **opts):
     '''create changeset information from CVS
--- a/hgext/convert/convcmd.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/convert/convcmd.py	Mon Mar 23 13:12:07 2009 +0100
@@ -10,7 +10,7 @@
 from darcs import darcs_source
 from git import convert_git
 from hg import mercurial_source, mercurial_sink
-from subversion import debugsvnlog, svn_source, svn_sink
+from subversion import svn_source, svn_sink
 from monotone import monotone_source
 from gnuarch import gnuarch_source
 from bzr import bzr_source
--- a/hgext/convert/monotone.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/convert/monotone.py	Mon Mar 23 13:12:07 2009 +0100
@@ -1,8 +1,8 @@
 # monotone support for the convert extension
 
-import os, re, time
+import os, re
 from mercurial import util
-from common import NoRepo, MissingTool, commit, converter_source, checktool
+from common import NoRepo, commit, converter_source, checktool
 from common import commandline
 from mercurial.i18n import _
 
--- a/hgext/graphlog.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/graphlog.py	Mon Mar 23 13:12:07 2009 +0100
@@ -12,13 +12,12 @@
 '''
 
 import os
-import sys
 from mercurial.cmdutil import revrange, show_changeset
-from mercurial.commands import templateopts, logopts, remoteopts
+from mercurial.commands import templateopts
 from mercurial.i18n import _
 from mercurial.node import nullrev
 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions
-from mercurial import hg, ui, url, util
+from mercurial import hg, url, util
 
 def revisions(repo, start, stop):
     """cset DAG generator yielding (rev, node, [parents]) tuples
--- a/hgext/notify.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/notify.py	Mon Mar 23 13:12:07 2009 +0100
@@ -65,7 +65,6 @@
  push changes to, they can manage their own subscriptions.'''
 
 from mercurial.i18n import _
-from mercurial.node import bin, short
 from mercurial import patch, cmdutil, templater, util, mail
 import email.Parser, fnmatch, socket, time
 
--- a/hgext/parentrevspec.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/parentrevspec.py	Mon Mar 23 13:12:07 2009 +0100
@@ -23,7 +23,6 @@
   foo~1 = foo^1 = foo^ = first parent of foo
   foo~2 = foo^1^1 = foo^^ = first parent of first parent of foo
 '''
-import mercurial.repo
 from mercurial import error
 
 def reposetup(ui, repo):
--- a/hgext/win32text.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/hgext/win32text.py	Mon Mar 23 13:12:07 2009 +0100
@@ -28,7 +28,7 @@
 # # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
 
 from mercurial.i18n import _
-from mercurial.node import bin, short
+from mercurial.node import short
 from mercurial import util
 import re
 
--- a/mercurial/bundlerepo.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/bundlerepo.py	Mon Mar 23 13:12:07 2009 +0100
@@ -10,10 +10,10 @@
 of the GNU General Public License, incorporated herein by reference.
 """
 
-from node import hex, nullid, short
+from node import nullid
 from i18n import _
 import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff
-import repo, localrepo, changelog, manifest, filelog, revlog, context, error
+import localrepo, changelog, manifest, filelog, revlog, error
 
 class bundlerevlog(revlog.revlog):
     def __init__(self, opener, indexfile, bundlefile,
@@ -158,7 +158,7 @@
             localrepo.localrepository.__init__(self, ui, path)
         except error.RepoError:
             self._tempparent = tempfile.mkdtemp()
-            tmprepo = localrepo.instance(ui,self._tempparent,1)
+            localrepo.instance(ui,self._tempparent,1)
             localrepo.localrepository.__init__(self, ui, self._tempparent)
 
         if path:
--- a/mercurial/copies.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/copies.py	Mon Mar 23 13:12:07 2009 +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 node import nullid, nullrev
 from i18n import _
 import util, heapq
 
--- a/mercurial/dispatch.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/dispatch.py	Mon Mar 23 13:12:07 2009 +0100
@@ -7,7 +7,7 @@
 
 from i18n import _
 import os, sys, atexit, signal, pdb, socket, errno, shlex, time
-import util, commands, hg, lock, fancyopts, extensions, hook, error
+import util, commands, hg, fancyopts, extensions, hook, error
 import cmdutil
 import ui as _ui
 
--- a/mercurial/filemerge.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/filemerge.py	Mon Mar 23 13:12:07 2009 +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 node import nullrev, short
+from node import short
 from i18n import _
 import util, os, tempfile, simplemerge, re, filecmp
 
--- a/mercurial/graphmod.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/graphmod.py	Mon Mar 23 13:12:07 2009 +0100
@@ -6,8 +6,7 @@
 # This software may be used and distributed according to the terms of
 # the GNU General Public License, incorporated herein by reference.
 
-from node import nullrev, short
-import ui, hg, util, templatefilters
+from node import nullrev
 
 def graph(repo, start_rev, stop_rev):
     """incremental revision grapher
--- a/mercurial/hgweb/hgweb_mod.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Mon Mar 23 13:12:07 2009 +0100
@@ -6,8 +6,7 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-import os, mimetypes
-from mercurial.node import hex, nullid
+import os
 from mercurial import ui, hg, util, hook, error
 from mercurial import templater, templatefilters
 from common import get_mtime, style_map, ErrorResponse
--- a/mercurial/hgweb/webcommands.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/hgweb/webcommands.py	Mon Mar 23 13:12:07 2009 +0100
@@ -8,8 +8,8 @@
 import os, mimetypes, re, cgi, copy
 import webutil
 from mercurial import error, archival, templatefilters
-from mercurial.node import short, hex, nullid
-from mercurial.util import binary, datestr
+from mercurial.node import short, hex
+from mercurial.util import binary
 from common import paritygen, staticfile, get_contact, ErrorResponse
 from common import HTTP_OK, HTTP_FORBIDDEN, HTTP_NOT_FOUND
 from mercurial import graphmod, util
--- a/mercurial/patch.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/patch.py	Mon Mar 23 13:12:07 2009 +0100
@@ -8,8 +8,8 @@
 
 from i18n import _
 from node import hex, nullid, short
-import base85, cmdutil, mdiff, util, revlog, diffhelpers, copies
-import cStringIO, email.Parser, os, re, errno, math
+import base85, cmdutil, mdiff, util, diffhelpers, copies
+import cStringIO, email.Parser, os, re, math
 import sys, tempfile, zlib
 
 gitre = re.compile('diff --git a/(.*) b/(.*)')
--- a/mercurial/pure/parsers.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/pure/parsers.py	Mon Mar 23 13:12:07 2009 +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 node import bin, hex, nullid, nullrev
+from node import bin, nullid, nullrev
 import revlog, dirstate, struct, util, zlib
 
 _pack = struct.pack
--- a/mercurial/repo.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/repo.py	Mon Mar 23 13:12:07 2009 +0100
@@ -7,6 +7,7 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 from i18n import _
+import error
 
 class repository(object):
     def capable(self, name):
--- a/mercurial/revlog.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/revlog.py	Mon Mar 23 13:12:07 2009 +0100
@@ -10,7 +10,8 @@
 of the GNU General Public License, incorporated herein by reference.
 """
 
-from node import bin, hex, nullid, nullrev, short
+# 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
--- a/mercurial/sshrepo.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/sshrepo.py	Mon Mar 23 13:12:07 2009 +0100
@@ -7,7 +7,7 @@
 
 from node import bin, hex
 from i18n import _
-import repo, os, re, util, error
+import repo, re, util, error
 
 class remotelock(object):
     def __init__(self, repo):
--- a/mercurial/statichttprepo.py	Mon Mar 23 13:12:03 2009 +0100
+++ b/mercurial/statichttprepo.py	Mon Mar 23 13:12:07 2009 +0100
@@ -9,7 +9,7 @@
 
 from i18n import _
 import changelog, byterange, url, error
-import repo, localrepo, manifest, util, store
+import localrepo, manifest, util, store
 import urllib, urllib2, errno
 
 class httprangereader(object):