Mercurial > hg-stable
changeset 4829:0403b80352c9
localrepo.wwrite: use opener.symlink
This makes us fall back to regular files if symlinks are not supported.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 11 Jul 2007 17:40:41 -0300 |
parents | 41ad4105dde9 |
children | 74f36b1027f4 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Jul 11 17:40:41 2007 -0300 +++ b/mercurial/localrepo.py Wed Jul 11 17:40:41 2007 -0300 @@ -455,15 +455,7 @@ def wwrite(self, filename, data, flags): data = self._filter("decode", filename, data) if "l" in flags: - f = self.wjoin(filename) - try: - os.unlink(f) - except OSError: - pass - d = os.path.dirname(f) - if not os.path.exists(d): - os.makedirs(d) - os.symlink(data, f) + self.wopener.symlink(data, filename) else: try: if self._link(filename):