The following patches improve the normal day-to-day use of hg when history includes closed heads/branches. It touches 'hg heads' and 'hg merge' with test patches for both. Differences since last submission: * The 'hg heads -a <branch>' is kept and now does something sane.