[PATCH 1 of 7] drop unused imports
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Thu Mar 12 07:06:11 UTC 2009
# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1236797382 -3600
drop unused imports
diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -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):
diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -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
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -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
diff --git a/hgext/convert/monotone.py b/hgext/convert/monotone.py
--- a/hgext/convert/monotone.py
+++ b/hgext/convert/monotone.py
@@ -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 _
diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -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
diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -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
diff --git a/hgext/parentrevspec.py b/hgext/parentrevspec.py
--- a/hgext/parentrevspec.py
+++ b/hgext/parentrevspec.py
@@ -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):
diff --git a/hgext/win32text.py b/hgext/win32text.py
--- a/hgext/win32text.py
+++ b/hgext/win32text.py
@@ -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
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -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:
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -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
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -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
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -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
diff --git a/mercurial/graphmod.py b/mercurial/graphmod.py
--- a/mercurial/graphmod.py
+++ b/mercurial/graphmod.py
@@ -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
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -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
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -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
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -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/(.*)')
diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -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
diff --git a/mercurial/repo.py b/mercurial/repo.py
--- a/mercurial/repo.py
+++ b/mercurial/repo.py
@@ -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):
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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
diff --git a/mercurial/sshrepo.py b/mercurial/sshrepo.py
--- a/mercurial/sshrepo.py
+++ b/mercurial/sshrepo.py
@@ -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):
diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -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):
More information about the Mercurial-devel
mailing list