mercurial/localrepo.py
changeset 4829 0403b80352c9
parent 4648 8e503fa54d2d
child 4868 192cd95c2ba8
child 4928 2a7d30c97f89
--- 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):