[PATCH 2 of 6] drop unused imports

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu May 14 09:27:34 CDT 2009


# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1242308146 -7200
# Node ID c236b8986ed27ad39e646e3683000e1e40493a9d
# Parent  8d82eb5481a176511bfac8c665d8e5a6f9b5790d
drop unused imports

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -8,7 +8,7 @@
 from node import hex, nullid, nullrev, short
 from i18n import _
 import os, sys, bisect, stat, errno
-import mdiff, bdiff, util, templater, templatefilters, patch, error, encoding
+import mdiff, bdiff, util, templater, patch, error, encoding
 import match as _match
 
 revrangesep = ':'
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
@@ -7,7 +7,7 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 import os
-from mercurial import ui, hg, util, hook, error, encoding, templater
+from mercurial import ui, hg, hook, error, encoding, templater
 from common import get_mtime, ErrorResponse
 from common import HTTP_OK, HTTP_BAD_REQUEST, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
 from common import HTTP_UNAUTHORIZED, HTTP_METHOD_NOT_ALLOWED
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -12,7 +12,7 @@
 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
+from mercurial import graphmod
 
 # __all__ is populated with the allowed commands. Be sure to add to it if
 # you're adding a new command, or the new command won't work.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -9,7 +9,7 @@
 from i18n import _
 import repo, changegroup
 import changelog, dirstate, filelog, manifest, context
-import lock, transaction, ui, store, encoding
+import lock, transaction, store, encoding
 import util, extensions, hook, error
 import match as match_
 import merge as merge_
diff --git a/mercurial/lsprofcalltree.py b/mercurial/lsprofcalltree.py
--- a/mercurial/lsprofcalltree.py
+++ b/mercurial/lsprofcalltree.py
@@ -10,10 +10,6 @@
 of the GNU General Public License, incorporated herein by reference.
 """
 
-import optparse
-import os
-import sys
-
 def label(code):
     if isinstance(code, str):
         return '~' + code    # built-in functions ('~' sorts at the end)
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -6,7 +6,7 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 from i18n import _
-import mdiff, parsers, util, error, revlog
+import mdiff, parsers, error, revlog
 import array, struct
 
 class manifestdict(dict):
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -6,7 +6,7 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 import cgi, re, os, time, urllib, textwrap
-import util, templater, encoding
+import util, encoding
 
 def stringify(thing):
     '''turn nested template iterator into string.'''
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -16,7 +16,7 @@
 from i18n import _
 import error, osutil
 import cStringIO, errno, re, shutil, sys, tempfile, traceback
-import os, stat, threading, time, calendar, glob, random
+import os, stat, time, calendar, glob, random
 import imp
 
 # Python compatibility


More information about the Mercurial-devel mailing list