[hg] Fixed NPE if hg exe is not configured.