make hg link secure

--HG--
branch : 2.7