remote-hg: add check_push() helper