changegroup: avoid shadowing a set with an int
authorAugie Fackler <augie@google.com>
Wed, 06 Nov 2019 17:23:47 -0500
changeset 43489 ea0b44255a31
parent 43488 ea25b4673231
child 43490 5b5e62c24b2e
changegroup: avoid shadowing a set with an int This confuses the heck out of pytype, and I basically agree with it that this shadowing is confusing. There's a chance this causes some memory to be freed later, but I think it's probably not worth worrying about for now. Differential Revision: https://phab.mercurial-scm.org/D7292
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Wed Nov 06 17:19:33 2019 -0500
+++ b/mercurial/changegroup.py	Wed Nov 06 17:23:47 2019 -0500
@@ -315,15 +315,15 @@
             )
             self.callback = progress.increment
 
-            efiles = set()
+            efilesset = set()
 
             def onchangelog(cl, node):
-                efiles.update(cl.readfiles(node))
+                efilesset.update(cl.readfiles(node))
 
             self.changelogheader()
             deltas = self.deltaiter()
             cgnodes = cl.addgroup(deltas, csmap, trp, addrevisioncb=onchangelog)
-            efiles = len(efiles)
+            efiles = len(efilesset)
 
             if not cgnodes:
                 repo.ui.develwarn(