tests: show that hg log --debug output differs from {file*} template keywords
hg log --debug -T xml doesn't differ, but let's test it because we can.
commit: remove special handling of IOError (actually dead code)
In the past, IOError was used to mark a file as removed. The differentiation
between OSError and IOError in this place was introduced in
e553a425751d, to
avoid that “normal” OSErrors / IOErrors accidentally mark files as removed.
This weird internal API was removed in
650b5b6e75ed. It seems like that
changeset should have removed the differentiation, at least I don’t see any
reason for keeping it.
On Python 3, OSError and IOError are aliased. Therefore the removed code was
actually dead.
py3: catch specific OSError subclasses instead of checking errno
On Python 3, the "not a directory" error is mapped to ENOTDIR instead of
EINVAL. Therefore, catching the NotADirectoryError subclass is sufficient.
py3: catch specific OSError subclasses instead of checking errno
Contrary to the previous changesets in this series, this covers cases where
errno was checked for multiple values.
EACCES -> PermissionError
ENOENT -> FileNotFoundError
ENOTDIR -> NotADirectoryError
EISDIR -> IsADirectoryError
py3: remove retry on EINTR errno
Since the implementation of PEP 475 (Python 3.5), Python retries system calls
failing with EINTR. Therefore we don’t need the logic that retries it in Python
code.
tests: assume that `raw` attribute is present on original socket file object
It seems like the original socket file object is always an io.BufferedIO
instance. If not, the code will fail and we should try harder to get the socket
object (e.g. if the original socket file object is unbuffered, we can get the
`_sock` attribute directly from it).