# HG changeset patch # User Steve Borho # Date 2009-09-15 00:53:43 # Node ID bc6b0fef9495b3944580a6bd26c7adecc87c3f88 # Parent 080227f584a140b2476d42346be9e9fd1c5649fe windows: provide filename in IOError exceptions This brings the Windows posixfile errors in line with the errors on other platforms. diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -17,7 +17,7 @@ def posixfile(name, mode='r', buffering= try: return osutil.posixfile(name, mode, buffering) except WindowsError, err: - raise IOError(err.errno, err.strerror) + raise IOError(err.errno, '%s: %s' % (name, err.strerror)) posixfile.__doc__ = osutil.posixfile.__doc__ class winstdout(object):