# HG changeset patch # User Ryan McElroy # Date 1490104228 25200 # Node ID 18b9d9b95719ae59c64c47f4f7e405349106fed8 # Parent ce4ddcda868b95d03bf8738c9390f60543d8c16a vfs: use tryunlink diff -r ce4ddcda868b -r 18b9d9b95719 mercurial/vfs.py --- a/mercurial/vfs.py Tue Mar 21 06:50:28 2017 -0700 +++ b/mercurial/vfs.py Tue Mar 21 06:50:28 2017 -0700 @@ -401,10 +401,7 @@ def symlink(self, src, dst): self.audit(dst) linkname = self.join(dst) - try: - os.unlink(linkname) - except OSError: - pass + util.tryunlink(linkname) util.makedirs(os.path.dirname(linkname), self.createmode)