Mercurial > public > mercurial-scm > hg
comparison mercurial/changegroup.py @ 43489:ea0b44255a31
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 06 Nov 2019 17:23:47 -0500 |
parents | 8f807a83d53b |
children | 5b5e62c24b2e |
comparison
equal
deleted
inserted
replaced
43488:ea25b4673231 | 43489:ea0b44255a31 |
---|---|
313 progress = repo.ui.makeprogress( | 313 progress = repo.ui.makeprogress( |
314 _(b'changesets'), unit=_(b'chunks'), total=expectedtotal | 314 _(b'changesets'), unit=_(b'chunks'), total=expectedtotal |
315 ) | 315 ) |
316 self.callback = progress.increment | 316 self.callback = progress.increment |
317 | 317 |
318 efiles = set() | 318 efilesset = set() |
319 | 319 |
320 def onchangelog(cl, node): | 320 def onchangelog(cl, node): |
321 efiles.update(cl.readfiles(node)) | 321 efilesset.update(cl.readfiles(node)) |
322 | 322 |
323 self.changelogheader() | 323 self.changelogheader() |
324 deltas = self.deltaiter() | 324 deltas = self.deltaiter() |
325 cgnodes = cl.addgroup(deltas, csmap, trp, addrevisioncb=onchangelog) | 325 cgnodes = cl.addgroup(deltas, csmap, trp, addrevisioncb=onchangelog) |
326 efiles = len(efiles) | 326 efiles = len(efilesset) |
327 | 327 |
328 if not cgnodes: | 328 if not cgnodes: |
329 repo.ui.develwarn( | 329 repo.ui.develwarn( |
330 b'applied empty changelog from changegroup', | 330 b'applied empty changelog from changegroup', |
331 config=b'warn-empty-changegroup', | 331 config=b'warn-empty-changegroup', |