--- a/mercurial/patch.py Thu Dec 08 15:33:19 2022 +0100
+++ b/mercurial/patch.py Thu Aug 31 23:56:15 2023 +0200
@@ -168,7 +168,7 @@
mimeheaders = [b'content-type']
- if not util.safehasattr(stream, 'next'):
+ if not hasattr(stream, 'next'):
# http responses, for example, have readline but not next
stream = fiter(stream)
@@ -1703,7 +1703,7 @@
newhunks = []
for c in hunks:
- if util.safehasattr(c, 'reversehunk'):
+ if hasattr(c, 'reversehunk'):
c = c.reversehunk()
newhunks.append(c)
return newhunks