diff mercurial/debugcommands.py @ 41365:876494fd967d

cleanup: delete lots of unused local variables These were found by IntelliJ. There are many more, but these seemed pretty safe. Differential Revision: https://phab.mercurial-scm.org/D5629
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 17 Jan 2019 09:17:12 -0800
parents a59a74721c76
children 7dc160a57025
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Mon Sep 24 14:46:37 2018 -0700
+++ b/mercurial/debugcommands.py	Thu Jan 17 09:17:12 2019 -0800
@@ -745,7 +745,6 @@
         nodates = True
     datesort = opts.get(r'datesort')
 
-    timestr = ""
     if datesort:
         keyfunc = lambda x: (x[1][3], x[0]) # sort by mtime, then by filename
     else:
@@ -1182,13 +1181,6 @@
     '''
     opts = pycompat.byteskwargs(opts)
 
-    def writetemp(contents):
-        (fd, name) = pycompat.mkstemp(prefix="hg-debuginstall-")
-        f = os.fdopen(fd, r"wb")
-        f.write(contents)
-        f.close()
-        return name
-
     problems = 0
 
     fm = ui.formatter('debuginstall', opts)
@@ -2569,7 +2561,6 @@
 
     source, branches = hg.parseurl(ui.expandpath(source))
     url = util.url(source)
-    addr = None
 
     defaultport = {'https': 443, 'ssh': 22}
     if url.scheme in defaultport: