make hg link secure