Mercurial > hg
changeset 14064:e4bfb9c337f3
remove unused imports and variables
author | Alexander Solovyov <alexander@solovyov.net> |
---|---|
date | Sat, 30 Apr 2011 13:59:14 +0200 |
parents | 87ebf72878ed |
children | 8f7132fa5e59 |
files | mercurial/bookmarks.py mercurial/cmdutil.py mercurial/commands.py mercurial/graphmod.py mercurial/hg.py mercurial/localrepo.py mercurial/merge.py mercurial/pure/parsers.py mercurial/repair.py mercurial/revlog.py mercurial/templatekw.py mercurial/url.py mercurial/util.py mercurial/windows.py mercurial/wireproto.py |
diffstat | 15 files changed, 17 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/bookmarks.py Sat Apr 30 13:59:14 2011 +0200 @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. from mercurial.i18n import _ -from mercurial.node import nullid, nullrev, bin, hex, short +from mercurial.node import hex from mercurial import encoding, error, util import errno, os
--- a/mercurial/cmdutil.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/cmdutil.py Sat Apr 30 13:59:14 2011 +0200 @@ -8,7 +8,7 @@ from node import hex, nullid, nullrev, short from i18n import _ import os, sys, errno, re, glob, tempfile -import util, scmutil, templater, patch, error, encoding, templatekw +import util, scmutil, templater, patch, error, templatekw import match as matchmod import similar, revset, subrepo
--- a/mercurial/commands.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/commands.py Sat Apr 30 13:59:14 2011 +0200 @@ -10,7 +10,7 @@ from i18n import _, gettext import os, re, sys, difflib, time, tempfile import hg, scmutil, util, revlog, extensions, copies, error, bookmarks -import patch, help, mdiff, url, encoding, templatekw, discovery +import patch, help, url, encoding, templatekw, discovery import archival, changegroup, cmdutil, sshserver, hbisect, hgweb, hgweb.server import merge as mergemod import minirst, revset, templatefilters
--- a/mercurial/graphmod.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/graphmod.py Sat Apr 30 13:59:14 2011 +0200 @@ -18,7 +18,6 @@ """ from mercurial.node import nullrev -from mercurial.cmdutil import revrange CHANGESET = 'C'
--- a/mercurial/hg.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/hg.py Sat Apr 30 13:59:14 2011 +0200 @@ -8,9 +8,9 @@ from i18n import _ from lock import release -from node import hex, nullid, nullrev, short +from node import hex, nullid import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo, bookmarks -import lock, util, extensions, error, encoding, node +import lock, util, extensions, error, node import cmdutil, discovery, url import merge as mergemod import verify as verifymod
--- a/mercurial/localrepo.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/localrepo.py Sat Apr 30 13:59:14 2011 +0200 @@ -190,7 +190,7 @@ warned = [0] def validate(node): try: - r = self.changelog.rev(node) + self.changelog.rev(node) return node except error.LookupError: if not warned[0]:
--- a/mercurial/merge.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/merge.py Sat Apr 30 13:59:14 2011 +0200 @@ -271,7 +271,6 @@ ms.reset(wctx.p1().node()) moves = [] action.sort(key=actionkey) - substate = wctx.substate # prime # prescan for merges u = repo.ui
--- a/mercurial/pure/parsers.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/pure/parsers.py Sat Apr 30 13:59:14 2011 +0200 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -from mercurial.node import bin, nullid, nullrev +from mercurial.node import bin, nullid from mercurial import util import struct, zlib
--- a/mercurial/repair.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/repair.py Sat Apr 30 13:59:14 2011 +0200 @@ -6,9 +6,9 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import changegroup, bookmarks -from node import nullrev, short -from i18n import _ +from mercurial import changegroup, bookmarks +from mercurial.node import short +from mercurial.i18n import _ import os def _bundle(repo, bases, heads, node, suffix, compress=True):
--- a/mercurial/revlog.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/revlog.py Sat Apr 30 13:59:14 2011 +0200 @@ -14,7 +14,7 @@ # import stuff from node for others to import from revlog from node import bin, hex, nullid, nullrev, short #@UnusedImport from i18n import _ -import changegroup, ancestor, mdiff, parsers, error, util +import ancestor, mdiff, parsers, error, util import struct, zlib, errno _pack = struct.pack @@ -288,7 +288,7 @@ @util.propertycache def nodemap(self): - n = self.rev(self.node(0)) + self.rev(self.node(0)) return self._nodecache def rev(self, node):
--- a/mercurial/templatekw.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/templatekw.py Sat Apr 30 13:59:14 2011 +0200 @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. from node import hex -import encoding, patch, util, error, help +import patch, util, error, help def showlist(name, values, plural=None, **args): '''expand set of values.
--- a/mercurial/url.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/url.py Sat Apr 30 13:59:14 2011 +0200 @@ -781,7 +781,7 @@ host = self.host if self.realhostport: # use CONNECT proxy - something = _generic_proxytunnel(self) + _generic_proxytunnel(self) host = self.realhostport.rsplit(':', 1)[0] cacerts = self.ui.config('web', 'cacerts')
--- a/mercurial/util.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/util.py Sat Apr 30 13:59:14 2011 +0200 @@ -933,7 +933,6 @@ # fill out defaults now = makedate() defaults = {} - nowmap = {} for part in ("d", "mb", "yY", "HI", "M", "S"): # this piece is for rounding the specific end of unknowns b = bias.get(part)
--- a/mercurial/windows.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/windows.py Sat Apr 30 13:59:14 2011 +0200 @@ -6,8 +6,8 @@ # GNU General Public License version 2 or any later version. from i18n import _ -import osutil, error -import errno, msvcrt, os, re, sys, subprocess +import osutil +import errno, msvcrt, os, re, sys nulldev = 'NUL:' umask = 002
--- a/mercurial/wireproto.py Sat Apr 30 07:30:38 2011 -0500 +++ b/mercurial/wireproto.py Sat Apr 30 13:59:14 2011 +0200 @@ -296,7 +296,7 @@ if len(new) == 20 and new.encode('string-escape') != new: # looks like it could be a binary node try: - u = new.decode('utf-8') + new.decode('utf-8') new = encoding.tolocal(new) # but cleanly decodes as UTF-8 except UnicodeDecodeError: pass # binary, leave unmodified