Mercurial > hg
comparison mercurial/windows.py @ 9449:61e30f257c15
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 16 Sep 2009 16:01:37 -0500 |
parents | 40196d036a71 bc6b0fef9495 |
children | 8b8920209317 012f1244cd4c |
comparison
equal
deleted
inserted
replaced
9447:bafde63c913a | 9449:61e30f257c15 |
---|---|
15 # wrap osutil.posixfile to provide friendlier exceptions | 15 # wrap osutil.posixfile to provide friendlier exceptions |
16 def posixfile(name, mode='r', buffering=-1): | 16 def posixfile(name, mode='r', buffering=-1): |
17 try: | 17 try: |
18 return osutil.posixfile(name, mode, buffering) | 18 return osutil.posixfile(name, mode, buffering) |
19 except WindowsError, err: | 19 except WindowsError, err: |
20 raise IOError(err.errno, err.strerror) | 20 raise IOError(err.errno, '%s: %s' % (name, err.strerror)) |
21 posixfile.__doc__ = osutil.posixfile.__doc__ | 21 posixfile.__doc__ = osutil.posixfile.__doc__ |
22 | 22 |
23 class winstdout(object): | 23 class winstdout(object): |
24 '''stdout on windows misbehaves if sent through a pipe''' | 24 '''stdout on windows misbehaves if sent through a pipe''' |
25 | 25 |