Remove SSH support from hg and improve check method