Hg branches

if this is backwards compatible and won't break anything I am OK with this push :)
and thank you for this, good stuff!