support branches for Mercurial repository
fixes #865
Merge pull request #866 from vladak/hg-branches

Hg branches