support branches for Mercurial repository
fixes #865