[#5767] fix mercurial import.  Thanks to honyczek for the patch