Mercurial > public > mercurial-scm > hg
comparison mercurial/wireprotov1server.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 | ad8d8dc9be3f |
children | 9cb51e74e9ad |
comparison
equal
deleted
inserted
replaced
41364:0132221c25cd | 41365:876494fd967d |
---|---|
422 if proto.name == 'http-v1': | 422 if proto.name == 'http-v1': |
423 return wireprototypes.ooberror(bundle2required) | 423 return wireprototypes.ooberror(bundle2required) |
424 raise error.Abort(bundle2requiredmain, | 424 raise error.Abort(bundle2requiredmain, |
425 hint=bundle2requiredhint) | 425 hint=bundle2requiredhint) |
426 | 426 |
427 prefercompressed = True | |
428 | |
429 try: | 427 try: |
430 clheads = set(repo.changelog.heads()) | 428 clheads = set(repo.changelog.heads()) |
431 heads = set(opts.get('heads', set())) | 429 heads = set(opts.get('heads', set())) |
432 common = set(opts.get('common', set())) | 430 common = set(opts.get('common', set())) |
433 common.discard(nullid) | 431 common.discard(nullid) |
576 os.unlink(tempname) | 574 os.unlink(tempname) |
577 fd, tempname = pycompat.mkstemp(prefix='hg-unbundle-') | 575 fd, tempname = pycompat.mkstemp(prefix='hg-unbundle-') |
578 repo.ui.debug('redirecting incoming bundle to %s\n' % | 576 repo.ui.debug('redirecting incoming bundle to %s\n' % |
579 tempname) | 577 tempname) |
580 fp = os.fdopen(fd, pycompat.sysstr('wb+')) | 578 fp = os.fdopen(fd, pycompat.sysstr('wb+')) |
581 r = 0 | |
582 for p in payload: | 579 for p in payload: |
583 fp.write(p) | 580 fp.write(p) |
584 fp.seek(0) | 581 fp.seek(0) |
585 | 582 |
586 gen = exchange.readbundle(repo.ui, fp, None) | 583 gen = exchange.readbundle(repo.ui, fp, None) |