3719 for branch in repo.branchmap(): |
3719 for branch in repo.branchmap(): |
3720 heads += repo.branchheads(branch, start, opts.get(b'closed')) |
3720 heads += repo.branchheads(branch, start, opts.get(b'closed')) |
3721 heads = [repo[h] for h in heads] |
3721 heads = [repo[h] for h in heads] |
3722 |
3722 |
3723 if branchrevs: |
3723 if branchrevs: |
3724 branches = set( |
3724 branches = { |
3725 repo[r].branch() for r in scmutil.revrange(repo, branchrevs) |
3725 repo[r].branch() for r in scmutil.revrange(repo, branchrevs) |
3726 ) |
3726 } |
3727 heads = [h for h in heads if h.branch() in branches] |
3727 heads = [h for h in heads if h.branch() in branches] |
3728 |
3728 |
3729 if opts.get(b'active') and branchrevs: |
3729 if opts.get(b'active') and branchrevs: |
3730 dagheads = repo.heads(start) |
3730 dagheads = repo.heads(start) |
3731 heads = [h for h in heads if h.node() in dagheads] |
3731 heads = [h for h in heads if h.node() in dagheads] |
3732 |
3732 |
3733 if branchrevs: |
3733 if branchrevs: |
3734 haveheads = set(h.branch() for h in heads) |
3734 haveheads = {h.branch() for h in heads} |
3735 if branches - haveheads: |
3735 if branches - haveheads: |
3736 headless = b', '.join(b for b in branches - haveheads) |
3736 headless = b', '.join(b for b in branches - haveheads) |
3737 msg = _(b'no open branch heads found on branches %s') |
3737 msg = _(b'no open branch heads found on branches %s') |
3738 if opts.get(b'rev'): |
3738 if opts.get(b'rev'): |
3739 msg += _(b' (started at %s)') % opts[b'rev'] |
3739 msg += _(b' (started at %s)') % opts[b'rev'] |