remote-hg: add branch_tip() helper