Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 14465:9e3a89c9e46c
commands: remove unused variable from heads command
The b variable has not been needed since fd511e9eeea6. Renamed ls
variable to bheads for clarity.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 31 May 2011 09:59:03 +0200 |
parents | d1a1578c5f78 |
children | bd34a027f3ed |
comparison
equal
deleted
inserted
replaced
14464:00256f689f9c | 14465:9e3a89c9e46c |
---|---|
2520 | 2520 |
2521 if opts.get('topo'): | 2521 if opts.get('topo'): |
2522 heads = [repo[h] for h in repo.heads(start)] | 2522 heads = [repo[h] for h in repo.heads(start)] |
2523 else: | 2523 else: |
2524 heads = [] | 2524 heads = [] |
2525 for b, ls in repo.branchmap().iteritems(): | 2525 for bheads in repo.branchmap().itervalues(): |
2526 if start is None: | 2526 if start is None: |
2527 heads += [repo[h] for h in ls] | 2527 heads += [repo[h] for h in bheads] |
2528 continue | 2528 continue |
2529 startrev = repo.changelog.rev(start) | 2529 startrev = repo.changelog.rev(start) |
2530 descendants = set(repo.changelog.descendants(startrev)) | 2530 descendants = set(repo.changelog.descendants(startrev)) |
2531 descendants.add(startrev) | 2531 descendants.add(startrev) |
2532 rev = repo.changelog.rev | 2532 rev = repo.changelog.rev |
2533 heads += [repo[h] for h in ls if rev(h) in descendants] | 2533 heads += [repo[h] for h in bheads if rev(h) in descendants] |
2534 | 2534 |
2535 if branchrevs: | 2535 if branchrevs: |
2536 branches = set(repo[br].branch() for br in branchrevs) | 2536 branches = set(repo[br].branch() for br in branchrevs) |
2537 heads = [h for h in heads if h.branch() in branches] | 2537 heads = [h for h in heads if h.branch() in branches] |
2538 | 2538 |