##// END OF EJS Templates
Catch both IOError and OSError, fix regression introduced by 8046f0a070a6
Benoit Boissinot -
r7421:4c432447 default
parent child Browse files
Show More
@@ -1583,7 +1583,7 b' class queue:'
1583 text = sys.stdin.read()
1583 text = sys.stdin.read()
1584 else:
1584 else:
1585 text = url.open(self.ui, filename).read()
1585 text = url.open(self.ui, filename).read()
1586 except IOError:
1586 except (OSError, IOError):
1587 raise util.Abort(_("unable to read %s") % filename)
1587 raise util.Abort(_("unable to read %s") % filename)
1588 if not patchname:
1588 if not patchname:
1589 patchname = normname(os.path.basename(filename))
1589 patchname = normname(os.path.basename(filename))
@@ -25,7 +25,7 b' hg init repo'
25 cd repo
25 cd repo
26
26
27 echo % qimport non-existing-file
27 echo % qimport non-existing-file
28 hg qimport non-existing-file 2>&1 | sed -e 's/\(No such file or directory:\) .*/\1/'
28 hg qimport non-existing-file
29
29
30 echo % import URL
30 echo % import URL
31 echo foo >> foo
31 echo foo >> foo
@@ -1,5 +1,5 b''
1 % qimport non-existing-file
1 % qimport non-existing-file
2 abort: No such file or directory:
2 abort: unable to read non-existing-file
3 % import URL
3 % import URL
4 adding url.diff to series file
4 adding url.diff to series file
5 url.diff
5 url.diff
General Comments 0
You need to be logged in to leave comments. Login now