add prompt support for hg.