[PATCH STABLE] windows: provide filename in IOError exceptions
Steve Borho
steve at borho.org
Mon Sep 14 20:13:37 CDT 2009
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1252976023 18000
# 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 @@
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):
More information about the Mercurial-devel
mailing list