convert: make hg sha1 regex consistently be a bytes
Differential Revision: https://phab.mercurial-scm.org/D2222