# HG changeset patch # User Brodie Rao # Date 1282930360 14400 # Node ID 516b000fbb7eb80874b7296a76ce077f42854bff # Parent c327bfa5e8315c6d1436599ea235e1e3a3293e7c cleanup: remove unused variables diff -r c327bfa5e831 -r 516b000fbb7e hgext/convert/bzr.py --- a/hgext/convert/bzr.py Fri Aug 27 13:32:38 2010 -0400 +++ b/hgext/convert/bzr.py Fri Aug 27 13:32:40 2010 -0400 @@ -61,7 +61,7 @@ try: tree = dir.open_workingtree(recommend_upgrade=False) branch = tree.branch - except (errors.NoWorkingTree, errors.NotLocalUrl), e: + except (errors.NoWorkingTree, errors.NotLocalUrl): tree = None branch = dir.open_branch() if (tree is not None and tree.bzrdir.root_transport.base != diff -r c327bfa5e831 -r 516b000fbb7e hgext/convert/cvs.py --- a/hgext/convert/cvs.py Fri Aug 27 13:32:38 2010 -0400 +++ b/hgext/convert/cvs.py Fri Aug 27 13:32:40 2010 -0400 @@ -53,8 +53,6 @@ try: os.chdir(self.path) id = None - state = 0 - filerevids = {} cache = 'update' if not self.ui.configbool('convert', 'cvsps.cache', True): diff -r c327bfa5e831 -r 516b000fbb7e hgext/inotify/client.py --- a/hgext/inotify/client.py Fri Aug 27 13:32:38 2010 -0400 +++ b/hgext/inotify/client.py Fri Aug 27 13:32:40 2010 -0400 @@ -21,7 +21,6 @@ Raise QueryFailed if something went wrong """ def decorated_function(self, *args): - result = None try: return function(self, *args) except (OSError, socket.error), err: diff -r c327bfa5e831 -r 516b000fbb7e hgext/mq.py --- a/hgext/mq.py Fri Aug 27 13:32:38 2010 -0400 +++ b/hgext/mq.py Fri Aug 27 13:32:40 2010 -0400 @@ -1756,7 +1756,6 @@ """print the patches already applied""" q = repo.mq - l = len(q.applied) if patch: if patch not in q.series: diff -r c327bfa5e831 -r 516b000fbb7e mercurial/commands.py --- a/mercurial/commands.py Fri Aug 27 13:32:38 2010 -0400 +++ b/mercurial/commands.py Fri Aug 27 13:32:40 2010 -0400 @@ -1360,7 +1360,7 @@ # check username ui.status(_("Checking username...\n")) try: - user = ui.username() + ui.username() except util.Abort, e: ui.write(" %s\n" % e) ui.write(_(" (specify a username in your .hgrc file)\n")) diff -r c327bfa5e831 -r 516b000fbb7e mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Fri Aug 27 13:32:38 2010 -0400 +++ b/mercurial/hgweb/webcommands.py Fri Aug 27 13:32:40 2010 -0400 @@ -383,7 +383,6 @@ latestentry=lambda **x: entries(True, 1, **x)) def branches(web, req, tmpl): - b = web.repo.branchtags() tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems()) heads = web.repo.heads() parity = paritygen(web.stripecount) diff -r c327bfa5e831 -r 516b000fbb7e mercurial/windows.py --- a/mercurial/windows.py Fri Aug 27 13:32:38 2010 -0400 +++ b/mercurial/windows.py Fri Aug 27 13:32:40 2010 -0400 @@ -288,7 +288,7 @@ '''atomically rename file src to dst, replacing dst if it exists''' try: os.rename(src, dst) - except OSError, err: # FIXME: check err (EEXIST ?) + except OSError: # FIXME: check err (EEXIST ?) # On windows, rename to existing file is not allowed, so we # must delete destination first. But if a file is open, unlink diff -r c327bfa5e831 -r 516b000fbb7e mercurial/wireproto.py --- a/mercurial/wireproto.py Fri Aug 27 13:32:38 2010 -0400 +++ b/mercurial/wireproto.py Fri Aug 27 13:32:40 2010 -0400 @@ -123,7 +123,7 @@ _('push failed:'), output) try: ret = int(ret) - except ValueError, err: + except ValueError: raise error.ResponseError( _('push failed (unexpected response):'), ret)