[PATCH 5 of 7] drop unused assignments
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Wed Mar 11 16:43:12 UTC 2009
# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1236789722 -3600
drop unused assignments
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2429,7 +2429,6 @@
wlock = repo.wlock()
try:
# walk dirstate.
- files = []
m = cmdutil.match(repo, pats, opts)
m.bad = lambda x,y: False
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -172,7 +172,6 @@
return _search(web, tmpl, hi) # XXX redirect to 404 page?
def changelist(limit=0, **map):
- cl = web.repo.changelog
l = [] # build a list in forward order for efficiency
for i in xrange(start, end):
ctx = web.repo[i]
diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -447,7 +447,6 @@
return value
def readline(self, limit=-1):
- data = ""
i = self._rbuf.find('\n')
while i < 0 and not (0 < limit <= len(self._rbuf)):
new = self._raw_read(self._rbufsize)
@@ -616,7 +615,7 @@
def test(url, N=10):
print "checking error hander (do this on a non-200)"
try: error_handler(url)
- except IOError, e:
+ except IOError:
print "exiting - exception will prevent further tests"
sys.exit()
print
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -160,7 +160,7 @@
if local:
try:
fp = self.opener('localtags', 'r+')
- except IOError, err:
+ except IOError:
fp = self.opener('localtags', 'a')
else:
prevtags = fp.read()
@@ -174,7 +174,7 @@
if use_dirstate:
try:
fp = self.wfile('.hgtags', 'rb+')
- except IOError, err:
+ except IOError:
fp = self.wfile('.hgtags', 'ab')
else:
prevtags = fp.read()
diff --git a/mercurial/lsprof.py b/mercurial/lsprof.py
--- a/mercurial/lsprof.py
+++ b/mercurial/lsprof.py
@@ -42,7 +42,6 @@
d = d[:top]
cols = "% 12s %12s %11.4f %11.4f %s\n"
hcols = "% 12s %12s %12s %12s %s\n"
- cols2 = "+%12s %12s %11.4f %11.4f + %s\n"
file.write(hcols % ("CallCount", "Recursive", "Total(ms)",
"Inline(ms)", "module:lineno(function)"))
count = 0
diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py
--- a/mercurial/sshserver.py
+++ b/mercurial/sshserver.py
@@ -121,8 +121,6 @@
self.fout.flush()
def do_changegroupsubset(self):
- bases = []
- heads = []
argmap = dict([self.getarg(), self.getarg()])
bases = [bin(n) for n in argmap['bases'].split(' ')]
heads = [bin(n) for n in argmap['heads'].split(' ')]
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -904,7 +904,6 @@
def _statfiles_clustered(files):
'''Stat each file in files and yield stat or None if file does not exist.
Cluster and cache stat per directory to minimize number of OS stat calls.'''
- lstat = os.lstat
ncase = os.path.normcase
sep = os.sep
dircache = {} # dirname -> filename -> status | None if file does not exist
More information about the Mercurial-devel
mailing list