Show More
@@ -2522,23 +2522,14 b' def heads(ui, repo, *branchrevs, **opts)' | |||||
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 |
|
2525 | for branch in repo.branchmap(): | |
2526 | if start is None: |
|
2526 | heads += repo.branchheads(branch, start, opts.get('closed')) | |
2527 |
|
|
2527 | heads = [repo[h] for h in heads] | |
2528 | continue |
|
|||
2529 | startrev = repo.changelog.rev(start) |
|
|||
2530 | descendants = set(repo.changelog.descendants(startrev)) |
|
|||
2531 | descendants.add(startrev) |
|
|||
2532 | rev = repo.changelog.rev |
|
|||
2533 | heads += [repo[h] for h in bheads if rev(h) in descendants] |
|
|||
2534 |
|
2528 | |||
2535 | if branchrevs: |
|
2529 | if branchrevs: | |
2536 | branches = set(repo[br].branch() for br in branchrevs) |
|
2530 | branches = set(repo[br].branch() for br in branchrevs) | |
2537 | heads = [h for h in heads if h.branch() in branches] |
|
2531 | heads = [h for h in heads if h.branch() in branches] | |
2538 |
|
2532 | |||
2539 | if not opts.get('closed'): |
|
|||
2540 | heads = [h for h in heads if not h.extra().get('close')] |
|
|||
2541 |
|
||||
2542 | if opts.get('active') and branchrevs: |
|
2533 | if opts.get('active') and branchrevs: | |
2543 | dagheads = repo.heads(start) |
|
2534 | dagheads = repo.heads(start) | |
2544 | heads = [h for h in heads if h.node() in dagheads] |
|
2535 | heads = [h for h in heads if h.node() in dagheads] |
General Comments 0
You need to be logged in to leave comments.
Login now