mercurial/util.py
changeset 4948 c8d1aa1822d5
parent 4876 001e8a745834
child 4956 02b127749dc0
--- a/mercurial/util.py	Thu Jul 19 15:13:48 2007 -0700
+++ b/mercurial/util.py	Thu Jul 19 15:29:33 2007 -0700
@@ -1303,7 +1303,11 @@
             os.makedirs(dirname)
 
         if self._can_symlink:
-            os.symlink(src, linkname)
+            try:
+                os.symlink(src, linkname)
+            except OSError, err:
+                raise OSError(err.errno, _('could not symlink to %r: %s') %
+                              (src, err.strerror), linkname)
         else:
             f = self(self, dst, "w")
             f.write(src)