Mercurial > hg
changeset 31549:18b9d9b95719
vfs: use tryunlink
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Tue, 21 Mar 2017 06:50:28 -0700 |
parents | ce4ddcda868b |
children | 66c3ae6d886c |
files | mercurial/vfs.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)