# HG changeset patch # User Matt Mackall # Date 2012-10-13 20:10:39 # Node ID 9837cafc25b10c51659b65b5971622eab0bc9197 # Parent a787e46d3b94ce127798f29d9e3d8e066c5813e8 vfs: use self.write to write symlink placeholders The existing write() path is much more robust than the hand-rolled version that was inlined here. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -327,10 +327,7 @@ class vfs(abstractvfs): raise OSError(err.errno, _('could not symlink to %r: %s') % (src, err.strerror), linkname) else: - f = self(dst, "w") - f.write(src) - f.close() - self._fixfilemode(dst) + self.write(dst, src) def audit(self, path): self.auditor(path)