Mercurial > hg-stable
changeset 17768:9837cafc25b1
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 13 Oct 2012 15:10:39 -0500 |
parents | a787e46d3b94 |
children | 8672e615d81c |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Sun Oct 14 23:49:28 2012 +0200 +++ b/mercurial/scmutil.py Sat Oct 13 15:10:39 2012 -0500 @@ -327,10 +327,7 @@ 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)