failsafe for hg prompt