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.
--- a/mercurial/commit.py Wed Jun 01 02:21:41 2022 +0200
+++ b/mercurial/commit.py Wed Jun 01 01:30:48 2022 +0200
@@ -4,8 +4,6 @@
# GNU General Public License version 2 or any later version.
-import errno
-
from .i18n import _
from .node import (
hex,
@@ -250,11 +248,6 @@
except OSError:
repo.ui.warn(_(b"trouble committing %s!\n") % uipathfn(f))
raise
- except IOError as inst:
- errcode = getattr(inst, 'errno', errno.ENOENT)
- if error or errcode and errcode != errno.ENOENT:
- repo.ui.warn(_(b"trouble committing %s!\n") % uipathfn(f))
- raise
# update manifest
removed = [f for f in removed if f in m1 or f in m2]