# HG changeset patch # User Dirkjan Ochtman # Date 1265481213 -3600 # Node ID 7516716e56dca496e1cc47755e116941a1192dba # Parent e2db50cae6e6c38ab762bb7c44edc3987841d39e commands: move inactive/closed out so they can have more effect diff -r e2db50cae6e6 -r 7516716e56dc mercurial/commands.py --- 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)