Mercurial > hg > mercurial-crew-with-dirclash
changeset 4930:c8d1aa1822d5
Print meaningful error message if os.symlink fails
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 19 Jul 2007 15:29:33 -0700 |
parents | 3e25a6eb5c9a |
children | 2f0f9528e77b |
files | mercurial/util.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -1303,7 +1303,11 @@ class opener(object): 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)