Mercurial > hg
changeset 10347:7516716e56dc
commands: move inactive/closed out so they can have more effect
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 06 Feb 2010 19:33:33 +0100 |
parents | e2db50cae6e6 |
children | 0fc5222c0951 |
files | mercurial/commands.py |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Feb 06 19:33:28 2010 +0100 +++ b/mercurial/commands.py Sat Feb 06 19:33:33 2010 +0100 @@ -1417,24 +1417,26 @@ start = None closed = opts.get('closed') - hideinactive, _heads = opts.get('active'), None if not branchrevs: heads = repo.heads(start) else: - if hideinactive: - dagheads = repo.heads(start) decode, encode = encoding.fromlocal, encoding.tolocal branches = set(repo[decode(br)].branch() for br in branchrevs) heads = [] for b in branches: - bheads = repo.branchheads(b, start, closed=closed) - if hideinactive: - bheads = [bhead for bhead in bheads if bhead in dagheads] + bheads = repo.branchheads(b, start, True) heads.extend(bheads) + if not opts.get('closed'): + heads = [h for h in heads if not repo[h].extra().get('close')] + + if opts.get('active'): + dagheads = repo.heads(start) + heads = [h for h in heads if h in dagheads] + haveheads = set(repo[h].branch() for h in heads) if branches - haveheads: headless = ', '.join(encode(b) for b in branches - haveheads)